diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 3e7f568..7e26b8a 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -5,9 +5,9 @@ name: Go on: push: - branches: [ "master" ] + branches: [ "main" ] pull_request: - branches: [ "master" ] + branches: [ "main" ] jobs: diff --git a/.github/workflows/gosec.yml b/.github/workflows/gosec.yml index d296ddb..432cb4f 100644 --- a/.github/workflows/gosec.yml +++ b/.github/workflows/gosec.yml @@ -2,10 +2,10 @@ name: Run Gosec on: push: branches: - - master + - main pull_request: branches: - - master + - main jobs: tests: runs-on: windows-latest diff --git a/Helpers/Settings.go b/Helpers/Settings.go index fdecb54..5580dfb 100644 --- a/Helpers/Settings.go +++ b/Helpers/Settings.go @@ -3,7 +3,6 @@ package Helpers import ( "encoding/json" "fmt" - "io/ioutil" "os" "sync" ) @@ -28,7 +27,7 @@ func (cm *ConfigurationManager) LoadConfig() { cm.configMu.Lock() defer cm.configMu.Unlock() - data, err := ioutil.ReadFile("config.json") + data, err := os.ReadFile("config.json") if err != nil { cm.config = Configuration{PrintInvalid: false, Threads: 550, ThreadingType: determineStrategy(), Timeout: 5000} cm.saveConfig() @@ -109,7 +108,7 @@ func (cm *ConfigurationManager) saveConfig() { os.Exit(1) } - err = ioutil.WriteFile("config.json", data, 0600) + err = os.WriteFile("config.json", data, 0600) if err != nil { fmt.Println("Error writing config file:", err) os.Exit(1)