Skip to content

Commit 45ac608

Browse files
committed
cli: rename to cligen
1 parent 1a63f48 commit 45ac608

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

cmd/climate/go.mod renamed to cmd/cligen/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
module github.com/avamsi/climate/cmd/climate
1+
module github.com/avamsi/climate/cmd/cligen
22

33
go 1.20
44

File renamed without changes.

cmd/climate/main.go renamed to cmd/cligen/main.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ type parseOptions struct {
9797
Debug bool // whether to print metadata
9898
}
9999

100-
// climate recursively parses the metadata of all Go packages in the current
100+
// cligen recursively parses the metadata of all Go packages in the current
101101
// directory and its subdirectories, and writes it to the given output file.
102102
//
103-
//cli:usage climate [opts]
103+
//cli:usage cligen [opts]
104104
func parse(opts *parseOptions) {
105105
var (
106106
rootMd internal.RawMetadata
@@ -136,10 +136,10 @@ func parse(opts *parseOptions) {
136136
// #nosec G306 -- G306 expects 0o600 or less but 0o644 is fine here as the
137137
// metadata is not really sensitive (and is expected to be committed).
138138
assert.Nil(os.WriteFile(opts.Out, rootMd.Encode(), 0o644))
139-
fmt.Println("climate: (re)generated", opts.Out)
139+
fmt.Println("cligen: (re)generated", opts.Out)
140140
}
141141

142-
//go:generate go run github.com/avamsi/climate/cmd/climate --out=md.cli
142+
//go:generate go run github.com/avamsi/climate/cmd/cligen --out=md.cli
143143
//go:embed md.cli
144144
var md []byte
145145

File renamed without changes.

cmd/examples/go.mod

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ go 1.20
44

55
require (
66
github.com/avamsi/climate v0.0.0
7-
github.com/avamsi/climate/cmd/climate v0.0.0
7+
github.com/avamsi/climate/cmd/cligen v0.0.0
88
github.com/google/go-cmp v0.5.9
99
)
1010

1111
replace (
1212
github.com/avamsi/climate v0.0.0 => ../..
13-
github.com/avamsi/climate/cmd/climate v0.0.0 => ../climate
13+
github.com/avamsi/climate/cmd/cligen v0.0.0 => ../cligen
1414
)
1515

1616
require (

cmd/examples/greet/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ func greet(opts *greetOptions) {
4545

4646
// * These only work if you generate and pass along "metadata" like below --
4747

48-
//go:generate go run github.com/avamsi/climate/cmd/climate --out=md.cli
48+
//go:generate go run github.com/avamsi/climate/cmd/cligen --out=md.cli
4949
//go:embed md.cli
5050
var md []byte
5151

cmd/examples/jj/main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (g *git) Export() {
6666
fmt.Println("export", g.J)
6767
}
6868

69-
//go:generate go run github.com/avamsi/climate/cmd/climate --out=md.cli
69+
//go:generate go run github.com/avamsi/climate/cmd/cligen --out=md.cli
7070
//go:embed md.cli
7171
var md []byte
7272

cmd/examples/tools.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,4 @@
22

33
package tools
44

5-
import _ "github.com/avamsi/climate/cmd/climate"
5+
import _ "github.com/avamsi/climate/cmd/cligen"

go.work

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ go 1.20
22

33
use (
44
.
5-
./cmd/climate
5+
./cmd/cligen
66
./cmd/examples
77
)

0 commit comments

Comments
 (0)