Skip to content

Commit

Permalink
feat: add config file from env value
Browse files Browse the repository at this point in the history
  • Loading branch information
langhuihui committed Jun 17, 2024
1 parent 28531ec commit 1a25bc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ toolchain go1.21.8

require (
go.uber.org/zap v1.27.0
m7s.live/engine/v4 v4.15.2-0.20240613010124-6360213cd761
m7s.live/engine/v4 v4.15.2-0.20240617004224-0dfd3e74509f
m7s.live/plugin/debug/v4 v4.0.3
m7s.live/plugin/fmp4/v4 v4.0.6
m7s.live/plugin/gb28181/v4 v4.4.5-0.20240521112210-a207352fe6e4
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -413,6 +413,8 @@ m7s.live/engine/v4 v4.15.2-0.20240612010920-cf636d3b6165 h1:6Ak4t2bb0eIvpqiHg6Eg
m7s.live/engine/v4 v4.15.2-0.20240612010920-cf636d3b6165/go.mod h1:uKxjmsjU1WARUNowEkP83BSrJMUjGwkJrX5nPi6DGmE=
m7s.live/engine/v4 v4.15.2-0.20240613010124-6360213cd761 h1:FElj0OuGk7TSSJEdRD9YhhWDPdpI1yjLrsxrIZRHzTo=
m7s.live/engine/v4 v4.15.2-0.20240613010124-6360213cd761/go.mod h1:uKxjmsjU1WARUNowEkP83BSrJMUjGwkJrX5nPi6DGmE=
m7s.live/engine/v4 v4.15.2-0.20240617004224-0dfd3e74509f h1:mWPYV7D8/gNQ9HAhpf4qJIKuO0ywQ1h9wZqUlo5kuLA=
m7s.live/engine/v4 v4.15.2-0.20240617004224-0dfd3e74509f/go.mod h1:uKxjmsjU1WARUNowEkP83BSrJMUjGwkJrX5nPi6DGmE=
m7s.live/plugin/debug/v4 v4.0.3 h1:lwqKkySXhu47kon/YeF+h5UXXac6c9seb2L6Y8X5ktM=
m7s.live/plugin/debug/v4 v4.0.3/go.mod h1:muzikl1KrHfbT/+2aHzKg9qDGfpArViQAtpcfFrST88=
m7s.live/plugin/fmp4/v4 v4.0.6 h1:X4FXfYuI1OCgaJzyJUNySDRPNPHzLJ5StgX/IxljQIA=
Expand Down
1 change: 0 additions & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ func main() {
if confPathFromEnv == "" {
confPathFromEnv = "config.yaml" // 如果环境变量未设置,默认使用此路径
}
fmt.Println("=== config file: ", confPathFromEnv)
conf := flag.String("c", confPathFromEnv, "config file")
flag.Parse()
ctx, cancel := context.WithCancel(context.WithValue(context.Background(), "version", version))
Expand Down

0 comments on commit 1a25bc4

Please sign in to comment.