github.com/jhump/golang-x-tools@v0.0.0-20220218190644-4958d6d39439/internal/lsp/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 "fmt" 12 "io/ioutil" 13 "os" 14 15 "github.com/jhump/golang-x-tools/internal/lsp/command/gen" 16 ) 17 18 func main() { 19 content, err := gen.Generate() 20 if err != nil { 21 fmt.Fprintf(os.Stderr, "%v\n", err) 22 os.Exit(1) 23 } 24 ioutil.WriteFile("command_gen.go", content, 0644) 25 }