1
// Copyright 2012 The Go Authors. All rights reserved.
2
// Use of this source code is governed by a BSD-style
3
// license that can be found in the LICENSE file.
5
// This file contains tests for the untagged struct literal checker.
9
// This file contains the test for untagged struct literals.
24
var Okay2 = map[string]bool{
40
type MyStruct struct {
52
// Testing is awkward because we need to reference things from a separate package
53
// to trigger the warnings.
55
var BadStructLiteralUsedInTests = flag.Flag{ // ERROR "untagged fields"
62
// Used to test the check for slices and arrays: If that test is disabled and
63
// vet is run with --compositewhitelist=false, this line triggers an error.
64
// Clumsy but sufficient.
65
var scannerErrorListTest = scanner.ErrorList{nil, nil}