cmdinit

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OsMkdirAll = os.MkdirAll

OsMkdirAll は os.MkdirAll のコピーです。テストで os.MkdirAll の挙動を変えたい 場合に代替関数を割り当ててモックしてください。

View Source
var OsUserHomeDir = os.UserHomeDir

OsUserHomeDir は os.UserHomeDir のコピーです。テストで os.UserHomeDir の挙動 を変えたい場合に代替関数を割り当ててモックしてください。

Functions

func New

func New(appInfo *appinfo.AppInfo) *cobra.Command

New は "say" コマンドの新規オブジェクト(のポインタ)を返します。

Types

type Command

type Command struct {
	*cobra.Command
	AppInfo *appinfo.AppInfo
	CUI     *cui.UI
	// contains filtered or unexported fields
}

Command は cobra.Command 型の拡張型です。cobra.Command に加えフラグの設定値を 保持するためのフィールドを持ちます。

func (*Command) ForceInit

func (c *Command) ForceInit(cmd *cobra.Command, pathDirConf string) error

ForceInit forces to initialize the configuration file.

func (*Command) Init

func (c *Command) Init(cmd *cobra.Command, args []string) error

Init メソッドは "init" コマンドの本体です。 ユーザーのホームディレクトリに、デフォルトのタスクと設定ファイルを作成します。

Jump to

Keyboard shortcuts

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