golang.org/x/tools/gopls@v0.15.3/internal/protocol/command/generate.go (about) 1 // Copyright 2021 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 ignore 6 // +build ignore 7 8 package main 9 10 import ( 11 "log" 12 "os" 13 14 "golang.org/x/tools/gopls/internal/protocol/command/gen" 15 ) 16 17 func main() { 18 content, err := gen.Generate() 19 if err != nil { 20 log.Fatal(err) 21 } 22 if err := os.WriteFile("command_gen.go", content, 0644); err != nil { 23 log.Fatal(err) 24 } 25 }