Skip to content

Commit

Permalink
add localstorage upload type
Browse files Browse the repository at this point in the history
  • Loading branch information
JojiiOfficial committed Oct 5, 2020
1 parent 953984a commit 64461af
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions UploadType.go
Expand Up @@ -9,6 +9,7 @@ type UploadType uint8
const (
NoUploadType UploadType = iota
DataManagerUploadType
LocalStorage
)

func (ut UploadType) String() string {
Expand All @@ -17,6 +18,8 @@ func (ut UploadType) String() string {
return "no upload"
case DataManagerUploadType:
return "DataManager"
case LocalStorage:
return "LocalStorage"
}

return "<invalid>"
Expand All @@ -29,6 +32,8 @@ func ParseUploadType(s string) UploadType {
switch s {
case strings.ToLower(DataManagerUploadType.String()):
return DataManagerUploadType
case strings.ToLower(LocalStorage.String()):
return LocalStorage
}

return NoUploadType
Expand Down

0 comments on commit 64461af

Please sign in to comment.