util

package
v0.0.0-...-772fc7e Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArchAlias

func ArchAlias(arch string) string

ArchAlias returns the alias of cpu's architecture. amd64: x86_64 arm64: aarch64

func CreateDir

func CreateDir(path string) error

func GetArgs

func GetArgs(argsMap map[string]string, args []string) ([]string, map[string]string)

func GetAvailableIP

func GetAvailableIP(ipAndMask string) []string

func GetAvailableIPRange

func GetAvailableIPRange(ipStart, ipEnd string) []string

func GetLocalIP

func GetLocalIP() (string, error)

func Home

func Home() (string, error)

Home returns the home directory for the executing user.

func IPAddressToCIDR

func IPAddressToCIDR(ipAdress string) string

func IPMaskStringToCIDR

func IPMaskStringToCIDR(netmask string) string

func InitLogger

func InitLogger(verbose bool)

func IsExist

func IsExist(path string) bool

func LocalIP

func LocalIP() string

func ParseIp

func ParseIp(ip string) []string

func RefineDockerVersion

func RefineDockerVersion(version string) (string, error)

func Render

func Render(tmpl *template.Template, variables map[string]interface{}) (string, error)

Render text template with given `variables` Render-context

Types

type Data

type Data map[string]interface{}

Directories

Path Synopsis
ssh

Jump to

Keyboard shortcuts

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