master
谢小军 5 years ago
parent 99d0e010e7
commit 1496cee107

BIN
.DS_Store vendored

Binary file not shown.

2
.gitignore vendored

@ -0,0 +1,2 @@
db/oauth_db.go

@ -2,6 +2,7 @@ package generate
import (
"fmt"
"sort"
"strings"
"github.com/xxjwxc/gormt/data/config"
@ -49,10 +50,17 @@ func (e *GenElement) AddTag(k string, v string) {
//Generate 获取结果数据
func (e *GenElement) Generate() string {
tag := ""
var tags []string
if e.Tags != nil {
for k, v := range e.Tags {
tags = append(tags, fmt.Sprintf(`%v:"%v"`, k, strings.Join(v, ";")))
var ks []string
for k := range e.Tags {
ks = append(ks, k)
}
sort.Strings(ks)
var tags []string
for _, v := range ks {
tags = append(tags, fmt.Sprintf(`%v:"%v"`, v, strings.Join(e.Tags[v], ";")))
}
tag = fmt.Sprintf("`%v`", strings.Join(tags, " "))
}

Loading…
Cancel
Save