utils

package
v0.0.0-...-7995a24 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckPathExists

func CheckPathExists(path string) (bool, error)

CheckPathExists checks if the path is exist or not

func CopyFile

func CopyFile(src, dest string) error

CopyFile copies file from src to dest

func CreatePath

func CreatePath(path string, override bool) error

CreatePath creates path directory and if override is specified the directory will be removed first

func CreatePaths

func CreatePaths(override bool, paths ...string) error

CreatePaths creates a batch of directories

func GetGOPATH

func GetGOPATH() (string, error)

GetGOPATH returns the environment variable GOPATH

func GetRealAddrByNetwork

func GetRealAddrByNetwork(addr string) string

utils to help get real ip like using this kind of format 'eth1:8088'

func GetRealIPv4ByNetwork

func GetRealIPv4ByNetwork(name string) (string, error)

utils to help get real ip using name like 'eth1'

Types

This section is empty.

Jump to

Keyboard shortcuts

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