Versions in this module Expand all Collapse all v1 v1.0.9 Nov 20, 2024 Changes in this version + func AddSingleQuotes(s []string) []string + func Any[T any](input []T, f func(T) bool) bool + func ArchSupported(arch string) bool + func ContainsIgnoreCase(s, substr string) bool + func ConvertInterfaceToMap(value interface{}) (map[string]interface{}, error) + func DirectoryExists(dirName string) bool + func Download(url string) ([]byte, error) + func DownloadStr(url string) (string, error) + func DownloadWithTee(url string, path string) ([]byte, error) + func E2EDocker() bool + func ExpandHome(path string) string + func FileCopy(src string, dst string) error + func FileExists(filename string) bool + func Filter[T any](input []T, f func(T) bool) []T + func Find[T any](input []T, f func(T) bool) *T + func GenDockerComposeFile(nodes int, ubuntuVersion string, networkPrefix string, sshPubKey string) (string, error) + func GenerateDockerHostIDs(numNodes int) []string + func GenerateDockerHostIPs(numNodes int) []string + func GetANRContext() (context.Context, context.CancelFunc) + func GetAPIContext() (context.Context, context.CancelFunc) + func GetAPILargeContext() (context.Context, context.CancelFunc) + func GetCodespaceURL(url string) (string, error) + func GetGitCommit(gitRepoURL string) string + func GetIndexInSlice[T comparable](list []T, element T) (int, error) + func GetRealFilePath(path string) string + func GetRepoFromCommitURL(gitRepoURL string) (string, string) + func GetSHA256FromDisk(binPath string) (string, error) + func GetSSHConnectionString(publicIP, certFilePath string) string + func GetURIHostPortAndPath(uri string) (string, uint32, string, error) + func GetUserIPAddress() (string, error) + func InsideCodespace() bool + func IsE2E() bool + func IsExecutable(filename string) bool + func IsSSHAgentAvailable() bool + func IsSSHAgentIdentityValid(identity string) (bool, error) + func IsSSHPubKey(pubkey string) bool + func IsUnsignedSlice(n []int) bool + func IsValidIP(ipStr string) bool + func IsValidURL(urlString string) bool + func ListSSHAgentIdentities() ([]string, error) + func MapWithError[T, U any](input []T, f func(T) (U, error)) ([]U, error) + func Map[T, U any](input []T, f func(T) U) []U + func NewBlsSecretKeyBytes() ([]byte, error) + func RandomString(length int) string + func ReadLongString(msg string, args ...interface{}) (string, error) + func ReadSSHAgentIdentityPublicKey(identityName string) (string, error) + func RemoveLineCleanChars(s string) string + func SaveDockerComposeFile(fileName string, nodes int, ubuntuVersion string, sshPubKey string) (string, error) + func ScriptLog(nodeID string, msg string, args ...interface{}) string + func SearchSHA256File(file []byte, toSearch string) (string, error) + func SetupRealtimeCLIOutput(cmd *exec.Cmd, redirectStdout bool, redirectStderr bool) (*bytes.Buffer, *bytes.Buffer) + func SortUint32(arr []uint32) + func SplitComaSeparatedInt(s string) []int + func SplitComaSeparatedString(s string) []string + func SplitKeyValueStringToMap(str string, delimiter string) (map[string]string, error) + func SplitSliceAt[T any](slice []T, index int) ([]T, []T) + func SplitStringWithQuotes(str string, r rune) []string + func StartDockerCompose(filePath string) error + func StopDockerCompose(filePath string) error + func Sum(s []int) int + func SupportedAvagoArch() []string + func TimedFunction(f func() (interface{}, error), name string, timeout time.Duration) (interface{}, error) + func ToNodeID(certBytes []byte, keyBytes []byte) (ids.NodeID, error) + func Unique(slice []string) []string + func UserHomePath(filePath ...string) string + func ValidateJSON(path string) ([]byte, error) + type Config struct + IPs []string + NetworkPrefix string + SSHPubKey string + UbuntuVersion string