Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
9dl committed Nov 16, 2024
1 parent 91336cb commit 86ad7ac
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Go

on:
push:
branches: [ "master" ]
branches: [ "main" ]
pull_request:
branches: [ "master" ]
branches: [ "main" ]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gosec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@ name: Run Gosec
on:
push:
branches:
- master
- main
pull_request:
branches:
- master
- main
jobs:
tests:
runs-on: windows-latest
Expand Down
5 changes: 2 additions & 3 deletions Helpers/Settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package Helpers
import (
"encoding/json"
"fmt"
"io/ioutil"
"os"
"sync"
)
Expand All @@ -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()
Expand Down Expand Up @@ -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)
Expand Down

0 comments on commit 86ad7ac

Please sign in to comment.