Documentation ¶
Overview ¶
Copyright (c) 2014-2019 Cesanta Software Limited All rights reserved
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- Constants
- func GetMosVersion() string
- func GetMosVersionSuffix() string
- func GetUbuntuBuildIDParts(buildId string) map[string]string
- func GetUbuntuUpdateChannel(buildId string) string
- func GetUserAgent() string
- func LooksLikeBrewBuildId(s string) bool
- func LooksLikeDistrBuildId(s string) bool
- func LooksLikeUbuntuBuildId(s string) bool
- func LooksLikeVersionNumber(s string) bool
- type VersionJson
Constants ¶
const (
LatestVersionName = "latest"
)
Variables ¶
This section is empty.
Functions ¶
func GetMosVersion ¶
func GetMosVersion() string
GetMosVersion returns this binary's version, or "latest" if it's not a release build.
func GetMosVersionSuffix ¶
func GetMosVersionSuffix() string
GetMosVersionSuffix returns an empty string if mos version is "latest"; otherwise returns the mos version prepended with a dash, like "-1.6".
func GetUbuntuBuildIDParts ¶
func GetUbuntuUpdateChannel ¶
GetUbuntuPackageName parses given build id string, and if it looks like a debian build id, returns either "latest" or "release". Otherwise, returns an empty string.
func GetUserAgent ¶
func GetUserAgent() string
func LooksLikeBrewBuildId ¶
func LooksLikeDistrBuildId ¶
Returns whether the build id looks like the mos was built in some distro environment (like, ubuntu or brew), and thus it shouldn't update itself.