common

package
v0.0.33 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Name            = "riff"
	Reset           = "\033[0m"
	Red             = "\033[31;1m"
	Green           = "\033[32;1m"
	Success         = Green + "[  OK  ]" + Reset
	Failed          = Red + "[FAILED]" + Reset
	DefaultHttpPort = 8610
	DefaultDnsPort  = 8620
	DefaultRpcPort  = 8630
)

Variables

View Source
var BinDir string
View Source
var GitBranch = "nil"
View Source
var GitSha = "nil"
View Source
var Type = "debug"

defined in ../scripts/build.sh

TYPE="release" VERSION="$(cat version)" GITSHA="$(git rev-parse HEAD)" GITBRANCH="$(git rev-parse --abbrev-ref HEAD)"

View Source
var Version = "v0.0.1.dev"

Functions

func AdviseRpc

func AdviseRpc() (string, error)

func GenerateID

func GenerateID(length int) string

func GetIpPort

func GetIpPort(ipPort string) (ip string, port int)

func GetPrivateIPv4

func GetPrivateIPv4() ([]*net.IPNet, error)

func IsExist

func IsExist(file string) bool

func IsRelease

func IsRelease() bool

func MakeFile

func MakeFile(path string) *os.File

func RandomNumber

func RandomNumber(n int) int

func ShaPass added in v0.0.18

func ShaPass(pass string) string

func Unzip

func Unzip(src, dest string, ignoreFirstFolder bool) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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