/
left76
/
cli
Обзор
Документация
Войти
/
left76
/
cli
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
vendor/github.com/docker/distribution/context/version.go
16 строк
586 B
Daniel Nephin
Add vendor
18 апр 2017, 01:12
18 апр 2017, 01:12
6686ada
Код
Авторство
О чём код?
package context // WithVersion stores the application version in the context. The new context // gets a logger to ensure log messages are marked with the application // version. func WithVersion(ctx Context, version string) Context { ctx = WithValue(ctx, "version", version) // push a new logger onto the stack return WithLogger(ctx, GetLogger(ctx, "version")) } // GetVersion returns the application version from the context. An empty // string may returned if the version was not set on the context. func GetVersion(ctx Context) string { return GetStringValue(ctx, "version") }