Skip to content

Commit

Permalink
update lock
Browse files Browse the repository at this point in the history
  • Loading branch information
Abdul Dakkak committed Oct 27, 2018
1 parent 5667787 commit 4abeceb
Show file tree
Hide file tree
Showing 4 changed files with 67 additions and 19 deletions.
47 changes: 28 additions & 19 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions cmd/config_debug.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
// +build debug

package cmd

import (
"io/ioutil"
"path/filepath"

sourcepath "github.com/GeertJohan/go-sourcepath"
"github.com/Unknwon/com"
)

var configContent string

func init() {
configPath := filepath.Join(sourcepath.MustAbsoluteDir(), "..", "rai_config.yml")
if !com.IsFile(configPath) {
panic("unable to locate " + configPath)
}
data, err := ioutil.ReadFile(configPath)
if err != nil {
panic("unable to read config file " + err.Error())
}
configContent = string(data)
}
7 changes: 7 additions & 0 deletions debug.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//+build debug

package main

const (
isDebug = true
)
7 changes: 7 additions & 0 deletions no_debug.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
//+build !debug

package main

const (
isDebug = true
)

0 comments on commit 4abeceb

Please sign in to comment.