Skip to content

Commit e9d8c83

Browse files
committed
fix: protoc-gen-sphere GoIdent initialization with options support
1 parent 23634e2 commit e9d8c83

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

contrib/protoc-gen-route/main.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,14 @@ func NewGoIdent(s string, options ...func(*GoIdent)) *GoIdent {
9393
if len(parts) != 2 {
9494
return nil
9595
}
96-
return &GoIdent{
96+
ident := &GoIdent{
9797
pkg: protogen.GoImportPath(parts[0]),
9898
ident: parts[1],
9999
}
100+
for _, opt := range options {
101+
opt(ident)
102+
}
103+
return ident
100104
}
101105

102106
func identIsFunc() func(*GoIdent) {

scripts/rename.sh

+3
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,11 @@ fi
1515

1616
make init
1717

18+
rm -rf ./api
1819
rm -rf ./pkg
1920
rm -rf ./contrib
21+
rm -rf ./swagger
22+
2023
mkdir -p assets/dash/dashboard/apps/web-ele/dist
2124
touch assets/dash/dashboard/apps/web-ele/dist/index.html
2225

0 commit comments

Comments
 (0)