github.com/powerman/golang-tools@v0.1.11-0.20220410185822-5ad214d8d803/internal/lsp/debug/buildinfo_go1.18.go (about) 1 // Copyright 2022 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 5 //go:build go1.18 6 // +build go1.18 7 8 package debug 9 10 import ( 11 "runtime/debug" 12 ) 13 14 type BuildInfo debug.BuildInfo 15 16 func readBuildInfo() (*BuildInfo, bool) { 17 info, ok := debug.ReadBuildInfo() 18 return (*BuildInfo)(info), ok 19 }