github.com/bazelbuild/bazel-gazelle@v0.36.1-0.20240520142334-61b277ba6fed/language/go/constants.go (about) 1 /* Copyright 2018 The Bazel Authors. All rights reserved. 2 3 Licensed under the Apache License, Version 2.0 (the "License"); 4 you may not use this file except in compliance with the License. 5 You may obtain a copy of the License at 6 7 http://www.apache.org/licenses/LICENSE-2.0 8 9 Unless required by applicable law or agreed to in writing, software 10 distributed under the License is distributed on an "AS IS" BASIS, 11 WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 See the License for the specific language governing permissions and 13 limitations under the License. 14 */ 15 16 package golang 17 18 const ( 19 // defaultLibName is the name of the default go_library rule in a Go 20 // package directory. This name was originally chosen so that rules_go 21 // could translate between Bazel labels and Go import paths using go_prefix. 22 // It is no longer needed since go_prefix was deleted. 23 defaultLibName = "go_default_library" 24 25 // defaultTestName is a name of an internal test corresponding to 26 // defaultLibName. It does not need to be consistent to something but it 27 // just needs to be unique in the Bazel package 28 defaultTestName = "go_default_test" 29 30 // legacyProtoFilegroupName is the anme of a filegroup created in legacy 31 // mode for libraries that contained .pb.go files and .proto files. 32 legacyProtoFilegroupName = "go_default_library_protos" 33 34 // grpcCompilerLabel is the label for the gRPC compiler plugin, used in the 35 // "compilers" attribute of go_proto_library rules. 36 grpcCompilerLabel = "@io_bazel_rules_go//proto:go_grpc" 37 38 // goProtoSuffix is the suffix applied to the labels of all generated 39 // go_proto_library targets. 40 goProtoSuffix = "_go_proto" 41 )