fix: load yaml config file
This commit is contained in:
parent
8dc7bbc6d4
commit
26ce3260b9
|
@ -4,7 +4,7 @@ Tool to automatize your deploy based on file write changes
|
|||
|
||||
## Description
|
||||
|
||||
After some change is made in our listener file the script placed on path set on `.yaml` variable called **webhook_script_path** will be executed.
|
||||
After some change is made in our listener file the script placed on path set on `.yaml` configuration falled placed on `./configs/app.yaml` variable called **webhook_script_path** will be executed.
|
||||
|
||||
## Context
|
||||
|
||||
|
|
9
main.go
9
main.go
|
@ -1,7 +1,6 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"flag"
|
||||
"log"
|
||||
"os"
|
||||
"os/signal"
|
||||
|
@ -18,13 +17,7 @@ var (
|
|||
)
|
||||
|
||||
func main() {
|
||||
envFilePath := ""
|
||||
if os.Getenv("ENV") != "prod" {
|
||||
flag.StringVar(&envFilePath, ".env path", "/", "provide .env path file as an absolute path")
|
||||
flag.Parse()
|
||||
}
|
||||
|
||||
config, err := config.LoadConfig(envFilePath)
|
||||
config, err := config.LoadConfig("./configs/app.yaml")
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue