add anonymous annotation (#134)
* rebase upstream * rebase * trim no need line * trim no need line * trim no need line * update doc * remove update * remove no need * remove no need * goctl add jwt support * goctl add jwt support * goctl add jwt support * goctl support import * goctl support import * support return () * revert * refactor and rename folder to group * remove no need * add anonymous annotation * optimized * rename * rename * update test * optimized new command Co-authored-by: kingxt <dream4kingxt@163.com>
This commit is contained in:
@@ -84,6 +84,18 @@ memberLoop:
|
||||
if builder.Len() == 0 {
|
||||
return errors.New("invalid annotation format")
|
||||
}
|
||||
if len(annoName) > 0 {
|
||||
value := builder.String()
|
||||
if value != string(leftParenthesis) {
|
||||
builder.Reset()
|
||||
annos = append(annos, spec.Annotation{
|
||||
Name: annoName,
|
||||
Value: value,
|
||||
})
|
||||
annoName = ""
|
||||
break annotationLoop
|
||||
}
|
||||
}
|
||||
case next == leftParenthesis:
|
||||
if builder.Len() == 0 {
|
||||
return errors.New("invalid annotation format")
|
||||
@@ -101,6 +113,7 @@ memberLoop:
|
||||
Name: annoName,
|
||||
Properties: attrs,
|
||||
})
|
||||
annoName = ""
|
||||
break annotationLoop
|
||||
default:
|
||||
builder.WriteRune(next)
|
||||
|
||||
Reference in New Issue
Block a user