file

package
v1.10.0 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

package file contains commands related to file operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Flags

type Flags struct {
	Required bool
	Filename string
}

Flags contains the info needed for reading in a file for a command.

func NewFlags

func NewFlags(required bool) *Flags

NewFlags returns a new Flags

func (*Flags) AddFlags

func (f *Flags) AddFlags(cmd *cobra.Command)

AddFlags registers the flags on the supplied command.

func (*Flags) File

func (f *Flags) File() (*os.File, error)

File returns an opened file based on the filename. If `-` is provided, we return stdin.

Jump to

Keyboard shortcuts

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