mirror of
https://github.com/ceph/go-ceph
synced 2024-12-22 06:10:09 +00:00
tools: update implements tool to new deprecated/preview style
Signed-off-by: Sven Anderson <sven@redhat.com>
This commit is contained in:
parent
ac4494e707
commit
cee047149f
@ -85,11 +85,11 @@ func readDocComment(fdec *ast.FuncDecl, gfunc *goFunction) {
|
||||
gfunc.comment = fdec.Doc.Text()
|
||||
lines := strings.Split(gfunc.comment, "\n")
|
||||
for i := range lines {
|
||||
if strings.Contains(lines[i], "DEPRECATED") {
|
||||
if strings.HasPrefix(lines[i], "Deprecated: ") {
|
||||
gfunc.isDeprecated = true
|
||||
logger.Printf("marked deprecated: %s\n", fdec.Name.Name)
|
||||
}
|
||||
if strings.Contains(lines[i], "PREVIEW") {
|
||||
if strings.HasPrefix(lines[i], " PREVIEW") {
|
||||
gfunc.isPreview = true
|
||||
logger.Printf("marked preview: %s\n", fdec.Name.Name)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user