mirror of
https://github.com/yudai/gotty.git
synced 2025-12-22 10:20:14 +01:00
Refactor
This commit is contained in:
parent
54403dd678
commit
a6133f34b7
54 changed files with 2140 additions and 1334 deletions
|
|
@ -10,6 +10,8 @@ import (
|
|||
"github.com/codegangsta/cli"
|
||||
"github.com/fatih/structs"
|
||||
"github.com/yudai/hcl"
|
||||
|
||||
"github.com/yudai/gotty/pkg/homedir"
|
||||
)
|
||||
|
||||
func GenerateFlags(options ...interface{}) (flags []cli.Flag, mappings map[string]string, err error) {
|
||||
|
|
@ -100,7 +102,7 @@ func ApplyFlags(
|
|||
}
|
||||
|
||||
func ApplyConfigFile(filePath string, options ...interface{}) error {
|
||||
filePath = ExpandHomeDir(filePath)
|
||||
filePath = homedir.Expand(filePath)
|
||||
if _, err := os.Stat(filePath); os.IsNotExist(err) {
|
||||
return err
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue