本文整理匯總了Golang中github.com/juju/juju/version.Number.IsDev方法的典型用法代碼示例。如果您正苦於以下問題:Golang Number.IsDev方法的具體用法?Golang Number.IsDev怎麽用?Golang Number.IsDev使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類github.com/juju/juju/version.Number
的用法示例。
在下文中一共展示了Number.IsDev方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: PreferredStream
// PreferredStream returns the tools stream used to search for tools, based
// on the required version, whether devel mode is required, and any user specified stream.
func PreferredStream(vers *version.Number, forceDevel bool, stream string) string {
// If the use has already nominated a specific stream, we'll use that.
if stream != "" && stream != ReleasedStream {
return stream
}
// If we're not upgrading from a known version, we use the
// currently running version.
if vers == nil {
vers = &version.Current.Number
}
// Devel versions are alpha or beta etc as defined by the version tag.
// The user can also force the use of devel streams via config.
if forceDevel || vers.IsDev() {
return DevelStream
}
return ReleasedStream
}