flag

package
v0.0.0-...-d32eb86 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Copyright 2023 Talhuang<talhuang1231@gmail.com>. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Copyright 2023 Talhuang<talhuang1231@gmail.com>. All rights reserved. Use of this source code is governed by a MIT style license that can be found in the LICENSE file.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddGlobalFlags

func AddGlobalFlags(fs *pflag.FlagSet, name string)

func InitFlags

func InitFlags(flags *pflag.FlagSet)

func PrintFlags

func PrintFlags(flags *pflag.FlagSet)

func PrintSections

func PrintSections(w io.Writer, fss NamedFlagSets, cols int)

PrintSections prints the given names flag sets in sections, with the maximal given column number. If cols is zero, lines are not wrapped.

func WordSepNormalizeFunc

func WordSepNormalizeFunc(f *pflag.FlagSet, name string) pflag.NormalizedName

Types

type NamedFlagSets

type NamedFlagSets struct {
	Order    []string
	FlagSets map[string]*pflag.FlagSet
}

func (*NamedFlagSets) FlagSet

func (nfs *NamedFlagSets) FlagSet(name string) *pflag.FlagSet

Jump to

Keyboard shortcuts

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