kythe.io@v0.0.68-0.20240422202219-7225dbc01741/kythe/proto/go.proto (about) 1 /* 2 * Copyright 2017 The Kythe Authors. All rights reserved. 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 syntax = "proto3"; 18 19 package kythe.proto; 20 21 option go_package = "kythe.io/kythe/proto/go_go_proto"; 22 option java_package = "com.google.devtools.kythe.proto"; 23 24 // Go-specific details used in a CompilationUnit. 25 // Its type is "kythe.io/proto/kythe.proto.GoDetails". 26 message GoDetails { 27 string goos = 1; // the GOOS value, e.g., "linux" 28 string goarch = 2; // the GOARCH value, e.g., "amd64" 29 string goroot = 3; // root directory of the Go installation 30 string gopath = 4; // root directory of the user's Go data 31 string compiler = 5; // the compiler used, e.g., "gc", "gccgo" 32 33 // Build tags that are effective for this compilation. 34 // This implicitly includes GOOS and GOARCH if provided. 35 repeated string build_tags = 6; 36 37 // Whether cgo is enabled for this compilation. 38 bool cgo_enabled = 7; 39 } 40 41 // GoPackageInfo provides details about a Go package. This may be in relation 42 // to a CompilationUnit as a whole or specific required input. 43 message GoPackageInfo { 44 string import_path = 1; 45 } 46 47 message FlagConstructors { 48 repeated FlagConstructor flag = 1; 49 } 50 51 // FlagConstructor is a descriptor of a flag constructing function. 52 message FlagConstructor { 53 string pkg_path = 1; 54 string func_name = 2; 55 56 // The 0-based position of the flag's name argument. 57 uint32 name_arg_position = 3; 58 // The 0-based position of the flag's description argument. 59 uint32 description_arg_position = 4; 60 // The 0-based position of the flag's var argument. 61 optional uint32 var_arg_position = 5; 62 }