generated from VLADIMIR/template
add db filepath
This commit is contained in:
@@ -2,10 +2,18 @@ package config
|
||||
|
||||
import "os"
|
||||
|
||||
func GetStoryFilePath() string {
|
||||
func GetStoryFilepath() string {
|
||||
storyFilename := os.Getenv("STORY_FILENAME")
|
||||
if storyFilename != "" {
|
||||
return storyFilename
|
||||
}
|
||||
return "./data/story/story.json"
|
||||
}
|
||||
|
||||
func GetDBFilepath() string {
|
||||
storyFilename := os.Getenv("DB_FILENAME")
|
||||
if storyFilename != "" {
|
||||
return storyFilename
|
||||
}
|
||||
return "data/db/store.db"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user