Versions in this module Expand all Collapse all v1 v1.0.11 Dec 2, 2026 v1.0.10 Dec 2, 2026 Changes in this version + const ExitConnect + const ExitError + const ExitOK + const ExitUsage + var Dialer func(ctx context.Context, env *Env) (*peer.Conn, error) + var KnownTarget func(name string) bool + var Version = "dev" + func FlagExit(err error) int + func FlagHint(name string) string + func IsID(s string) bool + func LooksLikeTarget(s string) bool + func Main(ctx context.Context, args []string, stdin io.Reader, stdout, stderr io.Writer) int + func NewFlagSet(env *Env, name, usage string) *flag.FlagSet + func NormalizeTarget(t string) string + func OneLine(s string) string + func Register(c *Command) + func Sanitize(s string) string + type Command struct + Hidden bool + Name string + Remote bool + RemoteRun func(ctx context.Context, env *Env, args []string) int + Run func(ctx context.Context, env *Env, args []string) int + Summary string + Topics map[string]string + Usage string + func Commands() []*Command + func Lookup(name string) *Command + type Env struct + DialFunc func(ctx context.Context, env *Env) (*peer.Conn, error) + Globals Globals + Stderr io.Writer + Stdin io.Reader + Stdout io.Writer + Target string + func (e *Env) Close() + func (e *Env) Conn(ctx context.Context) (*peer.Conn, error) + func (e *Env) Errorf(format string, args ...any) + type Globals struct + Password string + Signal string + Verbose bool