mirror of
https://github.com/taigrr/wails.git
synced 2026-04-08 16:11:37 -07:00
22 lines
328 B
Go
22 lines
328 B
Go
package parser
|
|
|
|
import (
|
|
"go/ast"
|
|
"strings"
|
|
)
|
|
|
|
func parseComments(comments *ast.CommentGroup) []string {
|
|
var result []string
|
|
|
|
if comments == nil {
|
|
return result
|
|
}
|
|
|
|
for _, comment := range comments.List {
|
|
commentText := strings.TrimPrefix(comment.Text, "//")
|
|
result = append(result, commentText)
|
|
}
|
|
|
|
return result
|
|
}
|