-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Abdul Dakkak
committed
Oct 27, 2018
1 parent
5667787
commit 4abeceb
Showing
4 changed files
with
67 additions
and
19 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//+build debug | ||
|
||
package main | ||
|
||
const ( | ||
isDebug = true | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//+build !debug | ||
|
||
package main | ||
|
||
const ( | ||
isDebug = true | ||
) |