This repository has been archived on 2022-09-04. You can view files and clone it, but cannot push or open issues or pull requests.
shared/tw/twutil/version_code_from_server_key.go
Kichiyaki e70c73a3fa refactor, add two new packages tw/urlbuilder and tw/twutil
tw/dataloader:
- Move endpoints to the new file
- use errors.New instead of fmt.Errorf
- new error messages
2021-05-02 09:44:49 +02:00

13 lines
207 B
Go

package twutil
import (
"github.com/tribalwarshelp/shared/models"
)
func VersionCodeFromServerKey(key string) models.VersionCode {
if len(key) < 2 {
return ""
}
return models.VersionCode(key[0:2])
}