util

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ArrayMap

func ArrayMap[T, U any](data []T, f func(T) U) []U

func FormatCreatedTime added in v0.4.0

func FormatCreatedTime(input string) string

func FormatStatusTime added in v0.4.0

func FormatStatusTime(input string) string

func GenerateIdFromName

func GenerateIdFromName(name string) string

func GetFirstWorkspaceProjectName

func GetFirstWorkspaceProjectName(workspaceId string, projectName string, profile *config.Profile) (string, error)

func GetGitContextFromUrl

func GetGitContextFromUrl(name string) (*types.Repository, error)

func GetRemoteOS added in v0.3.0

func GetRemoteOS(remote string) (*os.OperatingSystem, error)

func GetSshPrivateKeyPath

func GetSshPrivateKeyPath(privateKeyPath string) (string, *string, error)

GetSshPrivateKeyPath returns the path to the private key and the password if it's encrypted

func GetValidatedUrl

func GetValidatedUrl(input string) (string, error)

func GetValidatedWorkspaceName

func GetValidatedWorkspaceName(input string) (string, error)

func ReadLog

func ReadLog(ctx context.Context, filePath *string, follow bool, c chan []byte, errChan chan error)

func WorkspaceMode

func WorkspaceMode() bool

Types

type DebugLogWriter

type DebugLogWriter struct{}

func (*DebugLogWriter) Write

func (w *DebugLogWriter) Write(p []byte) (n int, err error)

type InfoLogWriter

type InfoLogWriter struct{}

func (*InfoLogWriter) Write

func (w *InfoLogWriter) Write(p []byte) (n int, err error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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