Skip to content

Commit

Permalink
feat: mkdir ffolder and open folder
Browse files Browse the repository at this point in the history
  • Loading branch information
lpxxn committed Jun 30, 2021
1 parent 268401e commit fbf1039
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
3 changes: 1 addition & 2 deletions config/config_file.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import (

"github.com/BurntSushi/toml"
"github.com/lpxxn/doraemon/internal"
"github.com/skratchdot/open-golang/open"
)

const (
Expand Down Expand Up @@ -52,7 +51,7 @@ func ConfDir() string {
return dirPath
}
func OpenConfDir() error {
return open.Run(ConfDir())
return internal.OpenFolder(ConfDir())
}

func WritTomlToConfig(v interface{}) error {
Expand Down
6 changes: 6 additions & 0 deletions internal/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ package internal
import (
"fmt"
"os"

"github.com/skratchdot/open-golang/open"
)

type Color string
Expand Down Expand Up @@ -76,3 +78,7 @@ func MakeFolder(folderName string, chmod os.FileMode) error {
return err
}
}

func OpenFolder(folderName string) error {
return open.Run(folderName)
}

0 comments on commit fbf1039

Please sign in to comment.