Skip to content

Commit

Permalink
Merge pull request #92 from edoardottt/devel
Browse files Browse the repository at this point in the history
Devel - fix actions failing (update golangcilint, ioutil, go version)
  • Loading branch information
edoardottt authored Oct 15, 2023
2 parents 8851581 + 36f7197 commit eb81a0e
Show file tree
Hide file tree
Showing 6 changed files with 10 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.18
go-version: 1.21

- name: Build
run: cd cmd && go build -v .
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/golangci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@ jobs:
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.19
go-version: 1.21
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.49
version: v1.54.2

# Optional: working directory, useful for monorepos
# working-directory: somedir
Expand Down
4 changes: 2 additions & 2 deletions cmd/input.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package main

import (
"fmt"
"io/ioutil"
"os"

"github.com/edoardottt/boggart/pkg/template"

Expand All @@ -34,7 +34,7 @@ import (
// The filename should be a YAML file.
// To check if the template is valid YAML check the error.
func ReadTemplate(filename string) (template.Template, error) {
buf, err := ioutil.ReadFile(filename)
buf, err := os.ReadFile(filename)
if err != nil {
return template.Template{}, fmt.Errorf("%v: %w", ErrReadTemplate, err)
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/edoardottt/boggart

go 1.18
go 1.21

require (
github.com/gorilla/mux v1.8.0
Expand Down
6 changes: 2 additions & 4 deletions internal/file/file.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,13 @@ along with this program. If not, see http://www.gnu.org/licenses/.

package file

import (
"io/ioutil"
)
import "os"

// ReadFile reads a file and returns the content
// of the inputted file.
func ReadFile(inputFile string) (string, error) {
var content []byte
content, err := ioutil.ReadFile(inputFile)
content, err := os.ReadFile(inputFile)

return string(content), err
}
4 changes: 2 additions & 2 deletions pkg/shodan/shodan.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ package shodan

import (
"encoding/json"
"io/ioutil"
"io"
"log"
"net/http"
"os"
Expand Down Expand Up @@ -76,7 +76,7 @@ func APIInfo(apiKey string) (APIInfoResponse, error) {
log.Fatal(err)
}

body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)

defer resp.Body.Close()

Expand Down

0 comments on commit eb81a0e

Please sign in to comment.