commands

package
v0.0.0-...-bc39d7e Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2020 License: LGPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RootCmd = &cobra.Command{
	Use:   "VOCCHAINd",
	Short: "Multiple asset management.",
	PersistentPreRunE: func(cmd *cobra.Command, args []string) error {
		err := viper.Unmarshal(config)
		if err != nil {
			return err
		}
		pathParts := strings.SplitN(config.RootDir, "/", 2)
		if len(pathParts) == 2 && (pathParts[0] == "~" || pathParts[0] == "$HOME") {
			usr, err := user.Current()
			if err != nil {
				cmn.Exit("Error: " + err.Error())
			}
			pathParts[0] = usr.HomeDir
			config.RootDir = strings.Join(pathParts, "/")
		}
		config.SetRoot(config.RootDir)
		return nil
	},
}

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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