Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update go version to 1.21 as 1.18 is causing issue in AppendUint32 #91

Merged
merged 14 commits into from
Oct 15, 2023
Merged
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
6 changes: 3 additions & 3 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.17
go-version: 1.21
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

golangci-lint is failing, I guess is related to this golangci/golangci-lint#3933 (comment)

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated golangci-lint to 1.54.2. This seems to work as per golangci/golangci-lint#3107 (comment)

- 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 All @@ -43,4 +43,4 @@ jobs:
# skip-pkg-cache: true

# Optional: if set to true then the action don't cache or restore ~/.cache/go-build.
# skip-build-cache: true
# skip-build-cache: true
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ Harry Potter and the Prisoner of Azkaban
Installation 📡
-------

*Disclaimer*: This is an ongoing and experimental project: there are features not yet available and features not (fully) tested. It is designed for home labs / home environments, not for professional or industrial purposes. Deploy in your network at your own risk.
> *Disclaimer*: This is an ongoing and experimental project: there are features not yet available and features not (fully) tested. It is designed for home labs / home environments, not for professional or industrial purposes. Deploy in your network at your own risk.

[Docker](https://docs.docker.com/get-docker/) and [Docker compose](https://docs.docker.com/compose/install/) are needed.

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