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: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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