Debian Codegraph @

gopls/internal/protocol/command/generate.go

raw symbols SCIP
1 // Copyright 2024 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
7 // The generate command generates command_gen.go from a combination of
8 // static and dynamic analysis of the command package.
9 package main
10
11 import (
12 "log"
13 "os"
14
15 "golang.org/x/tools/gopls/internal/protocol/command/gen"
16 )
17
18 func main() {
19 content, err := gen.Generate()
20 if err != nil {
21 log.Fatal(err)
22 }
23 if err := os.WriteFile("command_gen.go", content, 0644); err != nil {
24 log.Fatal(err)
25 }
26 }