refactor parser and remove deprecated code (#204)

* add comment support

* add comment support

* 1. group support multi level folder
2. remove force flag

* bug fix

* refactor parser and remove deprecated code

* refactor parser and remove deprecated code

* refactor parser and remove deprecated code

* refactor parser and remove deprecated code

* refactor parser and remove deprecated code

* refactor parser and remove deprecated code

* refactor parser and remove deprecated code

Co-authored-by: kim <xutao@xiaoheiban.cn>
This commit is contained in:
kingxt
2020-11-13 23:01:19 +08:00
committed by GitHub
parent ef4d4968d6
commit 16bfb1b7be
14 changed files with 272 additions and 123 deletions

View File

@@ -27,6 +27,14 @@ type Attribute struct {
value string
}
func (s Service) Routes() []Route {
var result []Route
for _, group := range s.Groups {
result = append(result, group.Routes...)
}
return result
}
func (m Member) IsOptional() bool {
var option string

View File

@@ -57,10 +57,8 @@ type (
}
Service struct {
Name string
Annotations []Annotation
Routes []Route
Groups []Group
Name string
Groups []Group
}
Type struct {