github.com/hxx258456/ccgo@v0.0.5-0.20230213014102-48b35f46f66f/grpc/internal/profiling/goid_regular.go (about) 1 //go:build !grpcgoid 2 // +build !grpcgoid 3 4 /* 5 * 6 * Copyright 2019 gRPC authors. 7 * 8 * Licensed under the Apache License, Version 2.0 (the "License"); 9 * you may not use this file except in compliance with the License. 10 * You may obtain a copy of the License at 11 * 12 * http://www.apache.org/licenses/LICENSE-2.0 13 * 14 * Unless required by applicable law or agreed to in writing, software 15 * distributed under the License is distributed on an "AS IS" BASIS, 16 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 17 * See the License for the specific language governing permissions and 18 * limitations under the License. 19 * 20 */ 21 22 package profiling 23 24 // This dummy function always returns 0. In some modified dev environments, 25 // this may be replaced with a call to a function in a modified Go runtime that 26 // retrieves the goroutine ID efficiently. See goid_modified.go for a different 27 // version of goId that requires a grpcgoid build tag to compile. 28 func goid() int64 { 29 return 0 30 }