diff options
Diffstat (limited to 'ssh_utils.go')
-rw-r--r-- | ssh_utils.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ssh_utils.go b/ssh_utils.go index 7f3188f..8ad53ab 100644 --- a/ssh_utils.go +++ b/ssh_utils.go @@ -3,8 +3,12 @@ package main import ( "context" "errors" + "fmt" + "io" "net/url" "strings" + + "go.lindenii.runxiyu.org/lindenii-common/ansiec" ) var err_ssh_illegal_endpoint = errors.New("illegal endpoint during SSH access") @@ -52,3 +56,7 @@ func get_repo_path_perms_from_ssh_path_pubkey(ctx context.Context, ssh_path stri return 0, "", false, "", "", 0, err_ssh_illegal_endpoint } } + +func wf_error(w io.Writer, format string, args ...any) { + fmt.Fprintln(w, ansiec.Red + fmt.Sprintf(format, args...) + ansiec.Reset) +} |