helpers

package
v0.2.0-pre Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LatestVersion

func LatestVersion(vl []string) (string, error)

LatestVersion gets a slice of versions and returns the latest version as a string e.g. ["0.1", "0.10", "1.0"] or ["0.1.0", "0.10.1", "1.0.2"] any number of minor/patch versions will work as long as all versions are consistent i.e. this is not allowed ["0.1", "0.10.0", "1.0"] and the function will return error

func StringInSlice

func StringInSlice(s string, list []string) bool

StringInSlice returns true if s is in the list slice

func UniqueSlice

func UniqueSlice(s []string) []string

UniqueSlice returns a slice containing only the unique strings from the original

Types

This section is empty.

Jump to

Keyboard shortcuts

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