File tree Expand file tree Collapse file tree 9 files changed +11
-11
lines changed Expand file tree Collapse file tree 9 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
- module github.com/avamsi/climate/cmd/climate
1
+ module github.com/avamsi/climate/cmd/cligen
2
2
3
3
go 1.20
4
4
File renamed without changes.
Original file line number Diff line number Diff line change @@ -97,10 +97,10 @@ type parseOptions struct {
97
97
Debug bool // whether to print metadata
98
98
}
99
99
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
101
101
// directory and its subdirectories, and writes it to the given output file.
102
102
//
103
- //cli:usage climate [opts]
103
+ //cli:usage cligen [opts]
104
104
func parse (opts * parseOptions ) {
105
105
var (
106
106
rootMd internal.RawMetadata
@@ -136,10 +136,10 @@ func parse(opts *parseOptions) {
136
136
// #nosec G306 -- G306 expects 0o600 or less but 0o644 is fine here as the
137
137
// metadata is not really sensitive (and is expected to be committed).
138
138
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 )
140
140
}
141
141
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
143
143
//go:embed md.cli
144
144
var md []byte
145
145
File renamed without changes.
Original file line number Diff line number Diff line change @@ -4,13 +4,13 @@ go 1.20
4
4
5
5
require (
6
6
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
8
8
github.com/google/go-cmp v0.5.9
9
9
)
10
10
11
11
replace (
12
12
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
14
14
)
15
15
16
16
require (
Original file line number Diff line number Diff line change @@ -45,7 +45,7 @@ func greet(opts *greetOptions) {
45
45
46
46
// * These only work if you generate and pass along "metadata" like below --
47
47
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
49
49
//go:embed md.cli
50
50
var md []byte
51
51
Original file line number Diff line number Diff line change @@ -66,7 +66,7 @@ func (g *git) Export() {
66
66
fmt .Println ("export" , g .J )
67
67
}
68
68
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
70
70
//go:embed md.cli
71
71
var md []byte
72
72
Original file line number Diff line number Diff line change 2
2
3
3
package tools
4
4
5
- import _ "github.com/avamsi/climate/cmd/climate "
5
+ import _ "github.com/avamsi/climate/cmd/cligen "
Original file line number Diff line number Diff line change 2
2
3
3
use (
4
4
.
5
- ./cmd/climate
5
+ ./cmd/cligen
6
6
./cmd/examples
7
7
)
You can’t perform that action at this time.
0 commit comments