GoPLS Viewer

Home|gopls/go/analysis/passes/composite/whitelist.go
1// Copyright 2013 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.
4
5package composite
6
7// unkeyedLiteral is a white list of types in the standard packages
8// that are used with unkeyed literals we deem to be acceptable.
9var unkeyedLiteral = map[string]bool{
10    // These image and image/color struct types are frozen. We will never add fields to them.
11    "image/color.Alpha16"true,
12    "image/color.Alpha":   true,
13    "image/color.CMYK":    true,
14    "image/color.Gray16":  true,
15    "image/color.Gray":    true,
16    "image/color.NRGBA64"true,
17    "image/color.NRGBA":   true,
18    "image/color.NYCbCrA"true,
19    "image/color.RGBA64":  true,
20    "image/color.RGBA":    true,
21    "image/color.YCbCr":   true,
22    "image.Point":         true,
23    "image.Rectangle":     true,
24    "image.Uniform":       true,
25
26    "unicode.Range16"true,
27    "unicode.Range32"true,
28
29    // These four structs are used in generated test main files,
30    // but the generator can be trusted.
31    "testing.InternalBenchmark":  true,
32    "testing.InternalExample":    true,
33    "testing.InternalTest":       true,
34    "testing.InternalFuzzTarget"true,
35}
36
MembersX
Members
X