Help us shape the future of Go! Take the 2026 Go Developer Survey

flags

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package flags holds the command line flags of the clients of ratd: the ratd to reach and the client directory to present to it. They are declared once, for rat and rat-tool check, so that a harness command line is checked by copying it, with the same names and the same checks. The server has no default, as which machine to reach is the whole point of the configuration.

Internal: package connect, which programs outside rat import, gets no dependency on the command line library.

Index

Constants

View Source
const (
	ServerFlag = "server"
	BundleFlag = "bundle"
)

Names of the flags.

Variables

This section is empty.

Functions

func Flags

func Flags() []cli.Flag

Flags returns the flags naming the ratd to reach and the client directory to present to it, both required. A server address that is not HOST:PORT fails parsing.

Types

type Target

type Target struct {
	// Server is the address of ratd, HOST:PORT.
	Server string
	// Bundle is the client directory of a bundle, which names the session.
	Bundle string
}

Target is a ratd to reach, and the client directory to present to it.

func FromCommand

func FromCommand(cmd *cli.Command) Target

FromCommand returns the target named by the flags of cmd, checked while parsing them.

Jump to

Keyboard shortcuts

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