cmdlib

package
v0.0.0-...-9febfc8 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2025 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Overview

Package cmdlib contains common base tool.

Index

Constants

This section is empty.

Variables

View Source
var DefaultTaskPriority = 140

DefaultTaskPriority is the default priority for a swarming task.

Functions

func RegisterRemovalReason

func RegisterRemovalReason(rr *rem.RemovalReason, f *flag.FlagSet)

RegisterRemovalReason sets up the command line arguments for specifying a removal reason.

func SetLogging

func SetLogging(ctx context.Context, level logging.Level) context.Context

SetLogging is used to sets the level for the logger when needed

Types

type CommonFlags

type CommonFlags struct {
	// contains filtered or unexported fields
}

CommonFlags controls some commonly-used CLI flags.

func (*CommonFlags) Register

func (f *CommonFlags) Register(fl *flag.FlagSet)

Register sets up the common flags.

func (*CommonFlags) Verbose

func (f *CommonFlags) Verbose() bool

Verbose returns if the command is set to verbose mode.

type EnvFlags

type EnvFlags struct {
	// contains filtered or unexported fields
}

EnvFlags controls selection of the environment: either prod (default) or dev.

func (EnvFlags) Env

func (f EnvFlags) Env() site.Environment

Env returns the environment, either dev or prod.

func (*EnvFlags) Register

func (f *EnvFlags) Register(fl *flag.FlagSet)

Register sets up the -dev argument.

Jump to

Keyboard shortcuts

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