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

write

package
v8.149.6 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package write is what the team-file writes share -- adopt, update, transfer, set-lifecycle: one call to a write tool of giantswarm-repo-manager with dryRun or mode commit, the plan printed on a dry run and the outcome on a commit.

Index

Constants

View Source
const CallTimeout = 2 * time.Minute

CallTimeout bounds a write: the manager's writes run on GitHub within the call and may take up to a minute.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, session *client.Session, w io.Writer, f *Flags, tool string, args map[string]any) error

Run calls tool with args and prints the plan (a dry run) or the outcome (a commit), or the answer as it came.

Types

type Flags

type Flags struct {
	client.Flags
	DryRun bool
	Reason string
}

Flags are the flags every write takes: the output, --dry-run and --reason.

func (*Flags) Args

func (f *Flags) Args(args map[string]any) map[string]any

Args completes a write's arguments with the reason and dryRun or mode.

func (*Flags) Init

func (f *Flags) Init(cmd *cobra.Command, what string)

Init registers the flags; what says what the dry run leaves unwritten.

Jump to

Keyboard shortcuts

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