You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
606 B
33 lines
606 B
package archive |
|
|
|
// DescFormat is archive type. |
|
type DescFormat struct { |
|
ID int64 `json:"id"` |
|
Copyright int8 `json:"copyright"` |
|
TypeID int64 `json:"typeid"` |
|
Components string `json:"components"` |
|
Lang int8 `json:"lang"` |
|
} |
|
|
|
// AppFormat app format. |
|
type AppFormat struct { |
|
ID int64 `json:"id"` |
|
Copyright int8 `json:"copyright"` |
|
TypeID int64 `json:"typeid"` |
|
} |
|
|
|
//ToLang str to int8. |
|
func ToLang(langStr string) (lang int8) { |
|
if langStr == "" { |
|
langStr = "ch" |
|
} |
|
switch langStr { |
|
case "ch": |
|
lang = 0 |
|
case "en": |
|
lang = 1 |
|
case "jp": |
|
lang = 2 |
|
} |
|
return |
|
}
|
|
|