version

package
v0.0.0-...-b44964e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 13, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

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

View Source
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 GetUbuntuBuildIDParts(buildId string) map[string]string

func GetUbuntuUpdateChannel

func GetUbuntuUpdateChannel(buildId string) string

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 LooksLikeBrewBuildId(s string) bool

func LooksLikeDistrBuildId

func LooksLikeDistrBuildId(s string) bool

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.

func LooksLikeUbuntuBuildId

func LooksLikeUbuntuBuildId(s string) bool

func LooksLikeVersionNumber

func LooksLikeVersionNumber(s string) bool

Types

type VersionJson

type VersionJson struct {
	BuildId        string    `json:"build_id"`
	BuildTimestamp time.Time `json:"build_timestamp"`
	BuildVersion   string    `json:"build_version"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL