Skip to content

Commit 177d32c

Browse files
committed
dev: some maint updates
- update go to 1.22 (include formating) - update linter to 1.57 (include fixes) - simplify builds (go version)
1 parent d8133bf commit 177d32c

32 files changed

+131
-104
lines changed

.github/workflows/build.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,19 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 6
1717
steps:
18-
- uses: actions/setup-go@v5
19-
with:
20-
go-version: 1.17
2118
- name: Checkout
2219
uses: actions/checkout@v4
2320
with:
2421
fetch-depth: 0
22+
- uses: actions/setup-go@v5
23+
with:
24+
go-version-file: go.mod
25+
check-latest: true
2526
- name: Lint
2627
uses: golangci/golangci-lint-action@v4
2728
with:
2829
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
29-
version: v1.47
30+
version: v1.57.2
3031
args: --timeout 10m
3132

3233
test:
@@ -36,16 +37,16 @@ jobs:
3637
fail-fast: false
3738
matrix:
3839
os: [ubuntu-latest, macOS-latest, windows-latest]
39-
go: [1.17, 1.18, 1.19]
4040
steps:
4141
- name: Checkout
4242
uses: actions/checkout@v4
4343
with:
4444
fetch-depth: 0
45-
- name: "Setup Go ${{ matrix.go }}"
45+
- name: "Setup Go"
4646
uses: actions/setup-go@v5
4747
with:
48-
go-version: "${{ matrix.go }}"
48+
go-version-file: go.mod
49+
check-latest: true
4950
- name: "Setup Go modules cache"
5051
uses: "actions/cache@v4"
5152
with:

.github/workflows/codeql.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,11 @@ jobs:
2525
uses: actions/checkout@v4
2626
with:
2727
fetch-depth: 0
28+
# workaround for https://github.com/github/codeql/issues/15647
29+
- uses: actions/setup-go@v5
30+
with:
31+
go-version-file: go.mod
32+
check-latest: true
2833
- name: Initialize
2934
uses: github/codeql-action/init@v3
3035
with:

.github/workflows/prerelease.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ jobs:
1414
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
17-
- name: Determine Go version from go.mod
18-
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
1917
- name: Install Go
2018
uses: actions/setup-go@v5
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: go.mod
21+
check-latest: true
2322
- name: Create release
2423
uses: goreleaser/goreleaser-action@v5
2524
with:

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,11 @@ jobs:
1414
uses: actions/checkout@v4
1515
with:
1616
fetch-depth: 0 # See: https://goreleaser.com/ci/actions/
17-
- name: Determine Go version from go.mod
18-
run: echo "GO_VERSION=$(grep "go 1." go.mod | cut -d " " -f 2)" >> $GITHUB_ENV
1917
- name: Install Go
2018
uses: actions/setup-go@v5
2119
with:
22-
go-version: ${{ env.GO_VERSION }}
20+
go-version-file: go.mod
21+
check-latest: true
2322
- name: Create release
2423
uses: goreleaser/goreleaser-action@v5
2524
with:

.golangci.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,28 @@
1-
run:
2-
go: '1.17'
3-
41
linters-settings:
52
lll:
63
line-length: 140
4+
depguard:
5+
rules:
6+
main:
7+
files:
8+
- "$all"
9+
- "!$test"
10+
allow:
11+
- "$gostd"
12+
- github.com/
13+
tests:
14+
files:
15+
- "$test"
16+
allow:
17+
- "$gostd"
18+
- github.com/
719

820
linters:
921
# please, do not use `enable-all`: it's deprecated and will be removed soon.
1022
# inverted configuration with `enable-all` and `disable` is not scalable during updates of golangci-lint
1123
disable-all: true
1224
enable:
1325
- bodyclose
14-
- deadcode
1526
- depguard
1627
- dogsled
1728
- dupl
@@ -39,13 +50,11 @@ linters:
3950
- revive
4051
- rowserrcheck
4152
- staticcheck
42-
- structcheck
4353
- stylecheck
4454
- typecheck
4555
- unconvert
4656
- unparam
4757
- unused
48-
- varcheck
4958

5059
# don't enable:
5160
# - whitespace

.vscode/tasks.json

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,21 @@
66
{
77
"label": "Go Generate",
88
"type": "shell",
9-
"command": "PATH=$PATH:~/go/bin go generate ./...",
9+
"command": "go generate ./...",
10+
"presentation": {
11+
"echo": true,
12+
"reveal": "silent",
13+
"focus": false,
14+
"panel": "shared",
15+
"showReuseMessage": true,
16+
"clear": false
17+
},
18+
"problemMatcher":"$go"
19+
},
20+
{
21+
"label": "Go lint",
22+
"type": "shell",
23+
"command": "golangci-lint run ./...",
1024
"presentation": {
1125
"echo": true,
1226
"reveal": "silent",

cmd/e3dc/e3dc_help.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ package main
33
import (
44
"errors"
55
"fmt"
6-
"io/ioutil"
6+
"io"
77
"os"
88
"strings"
99

@@ -112,15 +112,15 @@ func checkFlags(fs *flag.FlagSet) (*flag.FlagSet, error) {
112112
m []byte
113113
err error
114114
)
115-
if m, err = ioutil.ReadFile(conf.file); err != nil {
115+
if m, err = os.ReadFile(conf.file); err != nil {
116116
return fs, fmt.Errorf("could not read input file: %s", err)
117117
}
118118
conf.request = string(m)
119119
} else {
120120
stat, _ := os.Stdin.Stat()
121121
if stdin := (stat.Mode() & os.ModeCharDevice) == 0; stdin {
122122
var bytes []byte
123-
bytes, err := ioutil.ReadAll(os.Stdin)
123+
bytes, err := io.ReadAll(os.Stdin)
124124
if err != nil {
125125
return fs, fmt.Errorf("could not read stdin: %s", err)
126126
}

cmd/e3dc/json_input.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ func unmarshalJSONValue(b []byte, m *rscp.Message) error {
2626
return nil
2727
}
2828

29-
//nolint: gomnd
29+
//nolint:gomnd
3030
func unmarshalJSONRequest(b []byte, m *rscp.Message) error {
3131
if isJSONEmpty(b) {
3232
return ErrInputInvalidTuple

go.mod

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module github.com/spali/go-rscp
22

3-
go 1.19
3+
go 1.22
44

55
require (
66
github.com/alvaroloes/enumer v1.1.2
@@ -14,6 +14,7 @@ require (
1414

1515
require (
1616
github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 // indirect
17-
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 // indirect
18-
golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b // indirect
17+
golang.org/x/mod v0.14.0 // indirect
18+
golang.org/x/sys v0.16.0 // indirect
19+
golang.org/x/tools v0.13.0 // indirect
1920
)

go.sum

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,11 @@ github.com/alvaroloes/enumer v1.1.2 h1:5khqHB33TZy1GWCO/lZwcroBFh7u+0j40T83VUbfA
22
github.com/alvaroloes/enumer v1.1.2/go.mod h1:FxrjvuXoDAx9isTJrv4c+T410zFi0DtXIT0m65DJ+Wo=
33
github.com/azihsoyn/rijndael256 v0.0.0-20200316065338-d14eefa2b66b h1:/2dABok/UswXOj5rjbR5bZ411ApGBq1pAEZdy5rvFrY=
44
github.com/azihsoyn/rijndael256 v0.0.0-20200316065338-d14eefa2b66b/go.mod h1:ef+2vMUkiKcy2Tz7HykB01KbgUnkK4gQKq4ZeR4RYVs=
5-
github.com/cstockton/go-conv v0.0.0-20170524002450-66a2b2ba36e1 h1:h4OgDocdYHGiUh+zUEe4nFlb9ShoHUllqDefGaRoZFg=
6-
github.com/cstockton/go-conv v0.0.0-20170524002450-66a2b2ba36e1/go.mod h1:MBKpQ5HV5wcT/nQYoEqjSMiXwxPouaReOs2f4kj70SQ=
75
github.com/cstockton/go-conv v1.0.0 h1:zj/q/0MpQ/97XfiC9glWiohO8lhgR4TTnHYZifLTv6I=
86
github.com/cstockton/go-conv v1.0.0/go.mod h1:HuiHkkRgOA0IoBNPC7ysG7kNpjDYlgM7Kj62yQPxjy4=
97
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
108
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
119
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
12-
github.com/go-test/deep v1.0.8 h1:TDsG77qcSprGbC6vTN8OuXp5g+J+b5Pcguhf7Zt61VM=
13-
github.com/go-test/deep v1.0.8/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
1410
github.com/go-test/deep v1.1.0 h1:WOcxcdHcvdgThNXjw0t76K42FXTU7HpNQWHpA2HHNlg=
1511
github.com/go-test/deep v1.1.0/go.mod h1:5C2ZWiW0ErCdrYzpqxLbTX7MG14M9iiw8DgHncVwcsE=
1612
github.com/jnovack/flag v1.16.0 h1:gJC3JVofq/hNGlNfki4NlIWLOiDkaeLNUOCzznCablU=
@@ -19,31 +15,28 @@ github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1 h1:/I3lTljEEDNYL
1915
github.com/pascaldekloe/name v0.0.0-20180628100202-0fd16699aae1/go.mod h1:eD5JxqMiuNYyFNmyY9rkJ/slN8y59oEu4Ei7F8OoKWQ=
2016
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2117
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
22-
github.com/sirupsen/logrus v1.8.1 h1:dJKuHgqk1NNQlqoA6BTlM1Wf9DOH3NBjQyu0h9+AZZE=
23-
github.com/sirupsen/logrus v1.8.1/go.mod h1:yWOB1SBYBC5VeMP7gHvWumXLIWorT60ONWic61uBYv0=
24-
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
25-
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
26-
github.com/sirupsen/logrus v1.9.2 h1:oxx1eChJGI6Uks2ZC4W1zpLlVgqB8ner4EuQwV4Ik1Y=
27-
github.com/sirupsen/logrus v1.9.2/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
2818
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
2919
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
3020
github.com/spali/go-slicereader v0.0.0-20201122145524-8e262e1a5127 h1:YDqvwAH/l3S4ZULmKlUYszPyLBjHq73CLuUPU+2jJeE=
3121
github.com/spali/go-slicereader v0.0.0-20201122145524-8e262e1a5127/go.mod h1:nf5bOq6n8UugtmQiD3l0BzkE5VP4NvyngFZVkH3ZzgM=
3222
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
33-
github.com/stretchr/testify v1.2.2 h1:bSDNvY7ZPG5RlJ8otE/7V6gMiyenm9RtJ7IUVIAoJ1w=
34-
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
23+
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
3524
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
3625
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
26+
golang.org/x/mod v0.14.0 h1:dGoOF9QVLYng8IHTm7BAyWqCqSheQ5pYWGhzW00YJr0=
27+
golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c=
3728
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
3829
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
30+
golang.org/x/sync v0.3.0 h1:ftCYgMx6zT/asHUrPw8BLLscYtGznsLAnjq5RH9P66E=
31+
golang.org/x/sync v0.3.0/go.mod h1:FU7BRWz2tNW+3quACPkgCx/L+uEAv1htQ0V83Z9Rj+Y=
3932
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
40-
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
41-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a h1:dGzPydgVsqGcTRVwiLJ1jVbufYwmzD3LfVPLKsKg+0k=
42-
golang.org/x/sys v0.0.0-20220520151302-bc2c85ada10a/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
43-
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8 h1:0A+M6Uqn+Eje4kHMK80dtF3JCXC4ykBgQG4Fe06QRhQ=
4433
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
34+
golang.org/x/sys v0.16.0 h1:xWw16ngr6ZMtmxDyKyIgsE93KNKz5HKmMa3b8ALHidU=
35+
golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
4536
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
46-
golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b h1:iEAPfYPbYbxG/2lNN4cMOHkmgKNsCuUwkxlDCK46UlU=
4737
golang.org/x/tools v0.0.0-20190524210228-3d17549cdc6b/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
38+
golang.org/x/tools v0.13.0 h1:Iey4qkscZuv0VvIt8E0neZjtPVQFSc870HQ448QgEmQ=
39+
golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58=
4840
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
41+
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c h1:dUUwHk2QECo/6vqA44rthZ8ie2QXMNeKRTHCNY2nXvo=
4942
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=

rscp/authlevel.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,9 @@ package rscp
33
type AuthLevel uint8
44

55
// all auth levels as constant
6+
//
7+
//nolint:revive,stylecheck
68
//go:generate go run github.com/alvaroloes/enumer -type=AuthLevel -json
7-
//nolint: revive,stylecheck
89
const (
910
AUTH_LEVEL_NO_AUTH AuthLevel = 0
1011
AUTH_LEVEL_USER AuthLevel = 10

rscp/authlevel_enumer.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rscp/client.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,14 +80,14 @@ func (c *Client) receive() ([]Message, error) {
8080
var dataSize uint16
8181
var m []Message
8282

83-
for i, new := 0, make([]byte, uint32(RSCP_CRYPT_BLOCK_SIZE)*uint32(c.config.ReceiveBufferBlockSize)); ; {
83+
for i, data := 0, make([]byte, uint32(RSCP_CRYPT_BLOCK_SIZE)*uint32(c.config.ReceiveBufferBlockSize)); ; {
8484
var err error
85-
if i, err = c.conn.Read(new); err != nil {
85+
if i, err = c.conn.Read(data); err != nil {
8686
return nil, fmt.Errorf("error during receive response: %w", err)
8787
} else if i == 0 {
8888
return nil, ErrRscpInvalidFrameLength
8989
}
90-
switch m, err = Read(&c.decrypter, &buf, &crcFlag, &frameSize, &dataSize, new[:i]); {
90+
switch m, err = Read(&c.decrypter, &buf, &crcFlag, &frameSize, &dataSize, data[:i]); {
9191
case errors.Is(err, ErrRscpInvalidFrameLength):
9292
// frame not complete
9393
continue

rscp/client_config.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ type ClientConfig struct {
3333
}
3434

3535
// defaultClientConfig defines the default config values used when not provided by the user.
36-
//nolint: gomnd
36+
//
37+
//nolint:gomnd
3738
var defaultClientConfig = ClientConfig{
3839
Port: 5033,
3940
HeartbeatInterval: time.Second * 10,

rscp/client_status.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,8 @@ func (status ClientStatus) String() string {
88
}
99

1010
// all errors as constant
11-
//nolint: revive,stylecheck
11+
//
12+
//nolint:revive,stylecheck
1213
const (
1314
STATUS_OK ClientStatus = 0
1415
STATUS_ERR_INVALID_INPUT ClientStatus = -1

rscp/constants.go

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
package rscp
22

3-
//nolint: revive,stylecheck
3+
//nolint:revive,stylecheck
44
const (
55
RSCP_FRAME_MAGIC_SIZE uint16 = 0x2 // magic field size of frame
66
RSCP_FRAME_CTRL_SIZE uint16 = 0x2 // control field size of frame
@@ -34,18 +34,19 @@ const (
3434
)
3535

3636
// control field of frame
37-
// Byte | 0 | 1 |
38-
// Bit | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |
39-
// | R R R C V V V V | R R R R R R R R |
40-
// | R R R | R R R R R R R R | Reserviert für zukünfige Erweiterungen -> RSCP_CTRL_BIT_MASK
41-
// | 0 0 0 | 0 0 0 0 0 0 0 0 | Derzeitiger Zustand für die reservierten Bit
42-
// | C | | Checksummen Flag -> RSCP_CTRL_BIT_MASK
43-
// | 0 | | Checksumme wird nicht verwendet
44-
// | 1 | | Checksumme wird verwendet. Das Feld CRC am Ende des Frames ist ein Pflichtfeld, ansonsten wird der Frame verworfen! -> RSCP_CRC_FLAG
45-
// | V V V V | | Versionskennzeichnung -> RSCP_CTRL_BIT_MASK_VERSION
46-
// | 0 0 0 1 | | Version 1.0 (Momentan einzig zugelassener Wert) -> RSCP_VERSION_1_0
4737
//
48-
//nolint: lll,revive,stylecheck
38+
// Byte | 0 | 1 |
39+
// Bit | 7 6 5 4 3 2 1 0 | 7 6 5 4 3 2 1 0 |
40+
// | R R R C V V V V | R R R R R R R R |
41+
// | R R R | R R R R R R R R | Reserviert für zukünfige Erweiterungen -> RSCP_CTRL_BIT_MASK
42+
// | 0 0 0 | 0 0 0 0 0 0 0 0 | Derzeitiger Zustand für die reservierten Bit
43+
// | C | | Checksummen Flag -> RSCP_CTRL_BIT_MASK
44+
// | 0 | | Checksumme wird nicht verwendet
45+
// | 1 | | Checksumme wird verwendet. Das Feld CRC am Ende des Frames ist ein Pflichtfeld, ansonsten wird der Frame verworfen! -> RSCP_CRC_FLAG
46+
// | V V V V | | Versionskennzeichnung -> RSCP_CTRL_BIT_MASK_VERSION
47+
// | 0 0 0 1 | | Version 1.0 (Momentan einzig zugelassener Wert) -> RSCP_VERSION_1_0
48+
//
49+
//nolint:lll,revive,stylecheck
4950
const (
5051
RSCP_CTRL_BIT_MASK_CRC uint16 = 0b0001000000000000 // allowed bit's for crc field of control field
5152
RSCP_FLAG_BIT_CRC uint8 = 12 // bit start position of crc field of control field

rscp/crypt.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"github.com/azihsoyn/rijndael256"
77
)
88

9-
//nolint: revive,stylecheck
9+
//nolint:revive,stylecheck
1010
const (
1111
RSCP_CRYPT_BLOCK_SIZE uint8 = rijndael256.BlockSize
1212
RSCP_CRYPT_BLOCK_PADDING = byte(0x00)

rscp/datatype_enumer.go

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rscp/datatype_length.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
package rscp
22

33
// defines the expected Length of the data type or 0 for variable length
4-
//nolint: gomnd
4+
//
5+
//nolint:gomnd
56
var lengthMap = map[DataType]uint16{
67
None: 0,
78
Bool: 1,

0 commit comments

Comments
 (0)