Skip to content
This repository has been archived by the owner on Nov 8, 2023. It is now read-only.

Commit

Permalink
Merge branch 'ThingsPanel:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
November-12 authored Sep 18, 2023
2 parents ee323c5 + 09e7286 commit 113c32e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ import (
"github.com/shirou/gopsutil/cpu"
"github.com/shirou/gopsutil/mem"

_ "ThingsPanel-Go/grpc/protocol_plugin/server"
//_ "ThingsPanel-Go/grpc/protocol_plugin/server"

_ "ThingsPanel-Go/cron"

Expand Down
2 changes: 2 additions & 0 deletions modules/dataService/dataService.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import (
"io/ioutil"
"log"
"os"
"strings"

"github.com/spf13/viper"
)
Expand Down Expand Up @@ -39,6 +40,7 @@ func loadConfig() {
viper.SetEnvPrefix("GOTP")
// 使 Viper 能够读取环境变量
viper.AutomaticEnv()
viper.SetEnvKeyReplacer(strings.NewReplacer(".", "_"))
viper.SetConfigFile(*envConfigFile)
if err = viper.ReadInConfig(); err != nil {
fmt.Println("FAILURE", err)
Expand Down

0 comments on commit 113c32e

Please sign in to comment.