Skip to content

Commit 78c45b8

Browse files
committed
nvim: rename to api.go, api_def.go and api_tool.go
1 parent 1c04416 commit 78c45b8

File tree

4 files changed

+9
-9
lines changed

4 files changed

+9
-9
lines changed
File renamed without changes.

nvim/apidef.go renamed to nvim/api_def.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
// +build ignore
22

33
// This file defines the Nvim remote API using Go syntax. Run the 'go generate'
4-
// command to convert this file to the API implementation in apiimp.go.
4+
// command to convert this file to the API implementation in api.go.
55
//
66
// The go generate command runs the apitool program. Run
77
//
8-
// go run apitool.go --help
8+
// go run api_tool.go --help
99
//
1010
// to learn more about the apitool program.
1111

nvim/apitool.go renamed to nvim/api_tool.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
// +build ignore
22

3-
// Command apitool generates apiimp.go from apidef.go. The command also has
4-
// an option to compare apidef.go to Nvim's current API meta data.
3+
// Command apitool generates api.go from api_def.go. The command also has
4+
// an option to compare api_def.go to Nvim's current API meta data.
55
package main
66

77
import (
@@ -121,10 +121,10 @@ func parseFields(fset *token.FileSet, fl *ast.FieldList) []*Field {
121121
return fields
122122
}
123123

124-
// parseAPIDef parses the file apidef.go.
124+
// parseAPIDef parses the file api_def.go.
125125
func parseAPIDef() ([]*Function, error) {
126126
fset := token.NewFileSet()
127-
file, err := parser.ParseFile(fset, "apidef.go", nil, parser.ParseComments)
127+
file, err := parser.ParseFile(fset, "api_def.go", nil, parser.ParseComments)
128128
if err != nil {
129129
return nil, err
130130
}
@@ -502,8 +502,8 @@ func dumpAPI() error {
502502
func main() {
503503
log.SetFlags(log.Lshortfile)
504504

505-
generateFlag := flag.String("generate", "", "Generate implementation from apidef.go and write to `file`")
506-
compareFlag := flag.Bool("compare", false, "Compare apidef.go to the output of nvim --api-info")
505+
generateFlag := flag.String("generate", "", "Generate implementation from api_def.go and write to `file`")
506+
compareFlag := flag.Bool("compare", false, "Compare api_def.go to the output of nvim --api-info")
507507
dumpFlag := flag.Bool("dump", false, "Print nvim --api-info as JSON")
508508
flag.Parse()
509509

nvim/nvim.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import (
1919
"github.com/neovim/go-client/msgpack/rpc"
2020
)
2121

22-
//go:generate go run apitool.go -generate apiimp.go
22+
//go:generate go run api_tool.go -generate api.go
2323

2424
var embedProcAttr *syscall.SysProcAttr
2525

0 commit comments

Comments
 (0)