Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jeromelesaux/martine
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelesaux committed Dec 17, 2022
2 parents dccf973 + ed176ca commit 129eb67
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 13 deletions.
7 changes: 3 additions & 4 deletions common/io.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bytes"
"encoding/binary"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"sort"
Expand All @@ -16,12 +15,12 @@ func WilcardedFiles(filespath []string) ([]string, error) {

for _, v := range filespath {
dir := filepath.Dir(v)
fis, err := ioutil.ReadDir(dir)
fis, err := os.ReadDir(dir)
if err != nil {
return fullfilespath, err
}
reg := filepath.Base(v)
//fmt.Fprintf(os.Stdout, "Regular to match (%s)\n", reg)
// fmt.Fprintf(os.Stdout, "Regular to match (%s)\n", reg)
for _, f := range fis {
if !f.IsDir() {
check := filepath.Join(dir, f.Name())
Expand All @@ -31,7 +30,7 @@ func WilcardedFiles(filespath []string) ([]string, error) {
fmt.Fprintf(os.Stderr, "Error while checking match with error %v\n", err)
return fullfilespath, err
}
//fmt.Fprintf(os.Stdout, "Returns %v\n", matchs)
// fmt.Fprintf(os.Stdout, "Returns %v\n", matchs)
if matchs {
// fmt.Fprintf(os.Stdout, "Ok (%s) matches (%s)\n", reg, check)
if !ContainsFilepath(fullfilespath, check) {
Expand Down
3 changes: 1 addition & 2 deletions export/impdraw/tile/imp.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"

Expand Down Expand Up @@ -96,7 +95,7 @@ func RawImp(filePath string) ([]byte, error) {
}
}

bf, err := ioutil.ReadAll(fr)
bf, err := io.ReadAll(fr)
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions export/ocpartstudio/ocp.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (
"fmt"
"image/color"
"io"
"io/ioutil"
"os"

"github.com/jeromelesaux/m4client/cpc"
Expand Down Expand Up @@ -164,7 +163,7 @@ func RawScr(filePath string) ([]byte, error) {
}
}

bf, err := ioutil.ReadAll(fr)
bf, err := io.ReadAll(fr)
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions export/ocpartstudio/window/win.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"encoding/binary"
"fmt"
"io"
"io/ioutil"
"os"

"github.com/jeromelesaux/m4client/cpc"
Expand Down Expand Up @@ -48,7 +47,7 @@ func RawWin(filePath string) ([]byte, error) {
}
}

bf, err := ioutil.ReadAll(fr)
bf, err := io.ReadAll(fr)
if err != nil {
return nil, err
}
Expand Down
4 changes: 2 additions & 2 deletions gfx/animate/anitmate_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import (
"image/draw"
"image/gif"
"image/png"
"io/ioutil"
"io"
"os"
"testing"

Expand Down Expand Up @@ -41,7 +41,7 @@ func TestCompressZx0(t *testing.T) {
t.Fatalf("%v", err)
}
defer f.Close()
b, err := ioutil.ReadAll(f)
b, err := io.ReadAll(f)
if err != nil {
t.Fatalf("%v", err)
}
Expand Down
8 changes: 7 additions & 1 deletion makefile
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,10 @@ package-linux:
fyne package -os linux -icon martine-logo.png -sourceDir ${SOURCEDIR} -name martine -appVersion $(appversion)
mv martine ${BINARY}/martine-${OS}-${ARCH}/
(make archive)


get-linter:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.50.1

lint:
@echo "Lint the whole project"
golangci-lint run --timeout 2m

0 comments on commit 129eb67

Please sign in to comment.