Update distribute-readme.go

This commit is contained in:
하훌 2020-04-07 23:53:10 +09:00 committed by GitHub
parent 9b290b543b
commit 446cdd836f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -64,7 +64,9 @@ func main() {
myMap := v.(map[string]interface{}) myMap := v.(map[string]interface{})
t := myMap["Type"].(string) t := myMap["Type"].(string)
d := myMap["Data"].(string) d := myMap["Data"].(string)
mt := myMap["Method"].(string)
_ = d _ = d
_ = mt
tool := make(map[string]interface{}) tool := make(map[string]interface{})
tool[k] = d tool[k] = d
fmt.Println(reflect.TypeOf(m[t]).String()) fmt.Println(reflect.TypeOf(m[t]).String())
@ -76,9 +78,8 @@ func main() {
m[t] = tool m[t] = tool
} }
} }
readme := "" readme := "| Type | Name | Method | Description | Popularity | Language |\r\n| ---------- | :---------- | :----------: | :----------: | :----------: | \r\n"
for k, vv := range m { for _, vv := range m {
readme = readme + "\r\n## " + k + "\r\n\r\n| Name | Description | Popularity | Language | Metadata |\r\n| ---------- | :---------- | :----------: | :----------: | :----------: |\r\n"
keys := []string{} keys := []string{}
_ = keys _ = keys
if vv != nil && reflect.TypeOf(vv).String() != "string" { if vv != nil && reflect.TypeOf(vv).String() != "string" {