Skip to content

Commit bd84fdf

Browse files
committed
rename new llcppg command to llcppgx
1 parent f1938d8 commit bd84fdf

File tree

10 files changed

+20
-37
lines changed

10 files changed

+20
-37
lines changed

cmd/internal/base/base.go

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,47 +30,47 @@ import (
3030
"github.com/goplus/llcppg/config"
3131
)
3232

33-
// A Command is an implementation of a llcppg command
34-
// like llcppg gensym or llcppg genpkg.
33+
// A Command is an implementation of a llcppgx command
34+
// like llcppgx gensym or llcppgx genpkg.
3535
type Command struct {
3636
// Run runs the command.
3737
// The args are the arguments after the command name.
3838
Run func(cmd *Command, args []string)
3939

4040
// UsageLine is the one-line usage message.
41-
// The words between "llcppg" and the first flag or argument in the line are taken to be the command name.
41+
// The words between "llcppgx" and the first flag or argument in the line are taken to be the command name.
4242
UsageLine string
4343

44-
// Short is the short description shown in the 'llcppg help' output.
44+
// Short is the short description shown in the 'llcppgx help' output.
4545
Short string
4646

4747
// Flag is a set of flags specific to this command.
4848
Flag flag.FlagSet
4949

5050
// Commands lists the available commands and help topics.
51-
// The order here is the order in which they are printed by 'llcppg help'.
51+
// The order here is the order in which they are printed by 'llcppgx help'.
5252
// Note that subcommands are in general best avoided.
5353
Commands []*Command
5454
}
5555

5656
// Llcppg command
5757
var Llcppg = &Command{
58-
UsageLine: "llcppg",
59-
Short: `llcppg aims to be a tool for automatically generating LLGo bindings for C/C++ libraries,
58+
UsageLine: "llcppgx",
59+
Short: `llcppgx aims to be a tool for automatically generating LLGo bindings for C/C++ libraries,
6060
enhancing the experience of integrating LLGo with C!`,
6161
// Commands initialized in package main
6262
}
6363

64-
// LongName returns the command's long name: all the words in the usage line between "llcppg" and a flag or argument,
64+
// LongName returns the command's long name: all the words in the usage line between "llcppgx" and a flag or argument,
6565
func (c *Command) LongName() string {
6666
name := c.UsageLine
6767
if i := strings.Index(name, " ["); i >= 0 {
6868
name = name[:i]
6969
}
70-
if name == "llcppg" {
70+
if name == "llcppgx" {
7171
return ""
7272
}
73-
return strings.TrimPrefix(name, "llcppg ")
73+
return strings.TrimPrefix(name, "llcppgx ")
7474
}
7575

7676
// Name returns the command's short name: the last word in the usage line before a flag or argument.

cmd/llcppg/gensig_cmd.gox

Lines changed: 0 additions & 13 deletions
This file was deleted.

cmd/llcppg/main_app.gox

Lines changed: 0 additions & 3 deletions
This file was deleted.

cmd/llcppg/version_cmd.gox

Lines changed: 0 additions & 11 deletions
This file was deleted.

cmd/llcppgx/main_app.gox

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
short `
2+
llcppgx aims to be a tool for automatically generating LLGo bindings for C/C++ libraries,
3+
enhancing the experience of integrating LLGo with C!`

cmd/llcppgx/version_cmd.gox

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
use "version"
2+
3+
short "Print llcppgx version"
4+
5+
run args => {
6+
self.Cmd.Run self.Cmd, args
7+
}

0 commit comments

Comments
 (0)