cmd

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ConfigDir は ~/.config/mushi を指します
	ConfigDir string
	// CacheDir は ~/.cache/mushi/github-gitignore を指します
	CacheDir string
	// CommonIgnorePath は共通無視ファイルのパスです
	CommonIgnorePath string
	// Version は mushi のバージョンです
	Version string = "v0.4.2"
)
View Source
var RootCmd = &cobra.Command{
	Use:     "mushi",
	Short:   "mushi is a gitignore template generator",
	Version: Version,
}

Functions

func DefaultContent added in v0.3.0

func DefaultContent() []byte

func EnsureCache added in v0.3.0

func EnsureCache(cacheDir string, skipUpdate bool) error

EnsureCache ensures the cache directory exists and updates it if needed skipUpdateがtrueの場合は更新をスキップ

func EnsureCommonIgnore added in v0.3.0

func EnsureCommonIgnore(configDir string) (string, error)

EnsureCommonIgnore ensures common.gitignore exists, creates it if not

func ResolveImports added in v0.3.0

func ResolveImports(content []byte, cacheDir string) ([]byte, error)

ResolveImports は、content 内の "#Import:template" 行を展開して、 対応するテンプレートの内容に置き換えます。

Types

type Config added in v0.2.0

type Config struct {
	NoUpdate bool `mapstructure:"no_update"`
}

Config は mushi の設定を保持する構造体です

Jump to

Keyboard shortcuts

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