Something went wrong. Try again.
An unofficial terminal client for Tangled, optimized for humans and agents. tgcli.wisp.place
Something went wrong. Try again.
1234567891011121314151617181920212223242526272829package cli
import ( "fmt" "os" "path/filepath")
func commandBody(body, bodyFile string) (string, error) { if bodyFile == "" { return body, nil } if body != "" { return "", fmt.Errorf("--body and --body-file cannot be used together") } data, err := os.ReadFile(bodyFile) if err != nil { return "", fmt.Errorf("read body file: %w", err) } return string(data), nil}
func bodyImageDir(bodyFile string) string { if bodyFile == "" { return "" } return filepath.Dir(bodyFile)}