Skip to content

Commit

Permalink
Merge pull request #11 from ieee0824/editor
Browse files Browse the repository at this point in the history
SetEditor関数追加
  • Loading branch information
ieee0824 authored Oct 3, 2017
2 parents fe4d7fa + 13202fe commit add880a
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions cryptex.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,23 @@ var (
NotFoundCommand = errors.New("not found command")
)

var (
EDITOR string
)

type Container struct {
EncryptionType string `json:"encryption_type"`
Values interface{} `json:"values"`
}

func SetEditor(e string) {
EDITOR = e
}

func getEditor() string {
if EDITOR != "" {
return EDITOR
}
if e := os.Getenv("DEFAULT_EDITOR"); e != "" {
return e
}
Expand Down

0 comments on commit add880a

Please sign in to comment.