/
githubmirror
/
client
Обзор
Документация
Войти
/
githubmirror
/
client
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
go/libkb/runmode.go
24 строки
556 B
Maxwell Krohn
copyrights on all files
02 ноя 2015, 23:48
02 ноя 2015, 23:48
b859f8f
Код
Авторство
О чём код?
// Copyright 2015 Keybase, Inc. All rights reserved. Use of // this source code is governed by the included BSD license. package libkb import ( "fmt" ) // StringToRunMode turns a string into a run-mode func StringToRunMode(s string) (RunMode, error) { switch s { case string(DevelRunMode): return DevelRunMode, nil case string(ProductionRunMode): return ProductionRunMode, nil case string(StagingRunMode): return StagingRunMode, nil case "": return NoRunMode, nil default: return NoRunMode, fmt.Errorf("unknown run mode: '%s'", s) } }