mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-03 23:20:26 +08:00
19 lines
308 B
Go
19 lines
308 B
Go
package models
|
|
|
|
import (
|
|
"encoding/json"
|
|
"github.com/iwind/TeaGo/logs"
|
|
)
|
|
|
|
func (this *RegionProvince) DecodeCodes() []string {
|
|
if len(this.Codes) == 0 {
|
|
return []string{}
|
|
}
|
|
result := []string{}
|
|
err := json.Unmarshal([]byte(this.Codes), &result)
|
|
if err != nil {
|
|
logs.Error(err)
|
|
}
|
|
return result
|
|
}
|