Skip to content

Commit

Permalink
Release 0.0.3
Browse files Browse the repository at this point in the history
  * Config file moved to 'acme/conf/' folder as it is most correct folder to keep configuration
  • Loading branch information
md2k committed Aug 3, 2016
1 parent aa2396c commit 3c26c14
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ func InitConfig(acme_path string) (cfg *HookConfig, err error) {
// Get My Name (AppName)
_, execName := filepath.Split(os.Args[0])
// Prepare Config full-path location
cfg_file := fmt.Sprintf("%s/hooks/%s.yaml", acme_path, execName)
cfg_file := fmt.Sprintf("%s/conf/%s.yaml", acme_path, execName)
// Read Yaml Config
yamlFile, err := ioutil.ReadFile(cfg_file)
if err != nil {
Expand Down
9 changes: 9 additions & 0 deletions utils/dns_tools.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,3 +197,12 @@ func UnFqdn(name string) string {
}
return name
}

func DomainBelongsToProvider(d string, l []string) bool {
for _, pd := range l {
if strings.Contains(d, pd) {
return true
}
}
return false
}
11 changes: 0 additions & 11 deletions utils/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package utils
import (
"encoding/json"
"fmt"
"strings"
"time"
)

Expand All @@ -16,16 +15,6 @@ func StirngInSlice(s string, l []string) bool {
return false
}

func DomainBelongsToProvider(d string, l []string) bool {
for _, pd := range l {
fmt.Println(pd, d)
if strings.Contains(d, pd) {
return true
}
}
return false
}

func Dump(cls interface{}) {
data, err := json.MarshalIndent(cls, "", " ")
if err != nil {
Expand Down

0 comments on commit 3c26c14

Please sign in to comment.