Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 3 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,32 +13,18 @@ defaults:
shell: bash

env:
# go needs absolute directories, using the $HOME variable doesn't work here.
GOCACHE: /home/runner/work/go/pkg/build
GOPATH: /home/runner/work/go
GO_VERSION: 1.22.x
GO_VERSION: 1.23.x

jobs:
build:
name: build package, run linter
runs-on: ubuntu-latest
steps:
- name: git checkout
uses: actions/checkout@v2

- name: go cache
uses: actions/cache@v1
with:
path: /home/runner/work/go
key: lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
restore-keys: |
lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-${{ hashFiles('**/go.sum') }}
lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-${{ github.job }}-
lndclient-${{ runner.os }}-go-${{ env.GO_VERSION }}-
lndclient-${{ runner.os }}-go-
uses: actions/checkout@v4

- name: setup go ${{ env.GO_VERSION }}
uses: actions/setup-go@v2
uses: actions/setup-go@v5
with:
go-version: '~${{ env.GO_VERSION }}'

Expand Down
11 changes: 4 additions & 7 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
run:
# timeout for analysis
timeout: 4m

go: "1.23"

linters-settings:
govet:
# Don't report about shadowed variables
check-shadowing: false
shadow: false
gofmt:
# simplify code: gofmt with `-s` option, true by default
simplify: true
Expand All @@ -20,8 +21,8 @@ linters-settings:
excludes:
- G402 # Look for bad TLS connection settings.
- G306 # Poor file permissions used when writing to a new file.
- G115 # Integer overflow conversion.
staticcheck:
go: "1.18"
checks: ["-SA1019"]

linters:
Expand Down Expand Up @@ -79,7 +80,6 @@ linters:
- contextcheck
- errname
- err113
- gomnd
- noctx
- nestif
- wsl
Expand All @@ -98,6 +98,3 @@ linters:
- mnd
- perfsprint
- inamedparam

# Disabled disabled because the Go version (1.21.4) of the project < 1.22.
- copyloopvar
6 changes: 2 additions & 4 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ require (
github.com/btcsuite/btclog/v2 v2.0.1-0.20250110154127-3ae4bf1cb318
github.com/btcsuite/btcwallet v0.16.10-0.20241127094224-93c858b2ad63
github.com/btcsuite/btcwallet/wtxmgr v1.5.4
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250212020202-7b294311bc96
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4
github.com/lightningnetwork/lnd/kvdb v1.4.12
github.com/stretchr/testify v1.9.0
google.golang.org/grpc v1.59.0
Expand Down Expand Up @@ -188,6 +188,4 @@ require (
// allows us to specify that as an option.
replace google.golang.org/protobuf => github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display

go 1.22.6

toolchain go1.22.7
go 1.23.6
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -437,8 +437,8 @@ github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display h1:pRdza2wl
github.com/lightninglabs/protobuf-go-hex-display v1.30.0-hex-display/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I=
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb h1:yfM05S8DXKhuCBp5qSMZdtSwvJ+GFzl94KbXMNB1JDY=
github.com/lightningnetwork/lightning-onion v1.2.1-0.20240712235311-98bd56499dfb/go.mod h1:c0kvRShutpj3l6B9WtTsNTBUtjSmjZXbJd9ZBRQOSKI=
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250212020202-7b294311bc96 h1:J2tXuBxK2Y1LFDwtf5Ykj5djpwzVRtMnzHWIjz6dv7U=
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250212020202-7b294311bc96/go.mod h1:+GycbwMkhxKNcarlXvKIZ+/0Tixwxx12DERwo1z7Fn4=
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4 h1:3UfT25sO71q3V7RSb/wE0ruiwk3ex30h7ZvPZ0O2Z80=
github.com/lightningnetwork/lnd v0.18.0-beta.rc4.0.20250304192711-9feb761b4ec4/go.mod h1:5fYMAma+ylPOV+wycJuxSIwPLyRYRqKZTfiqk+59c+s=
github.com/lightningnetwork/lnd/clock v1.1.1 h1:OfR3/zcJd2RhH0RU+zX/77c0ZiOnIMsDIBjgjWdZgA0=
github.com/lightningnetwork/lnd/clock v1.1.1/go.mod h1:mGnAhPyjYZQJmebS7aevElXKTFDuO+uNFFfMXK1W8xQ=
github.com/lightningnetwork/lnd/fn/v2 v2.0.8 h1:r2SLz7gZYQPVc3IZhU82M66guz3Zk2oY+Rlj9QN5S3g=
Expand Down
1 change: 0 additions & 1 deletion lightning_client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ func TestLightningClientAddInvoice(t *testing.T) {
}

for _, test := range tests {
test := test
t.Run(test.name, func(t *testing.T) {
ln := lightningClient{
client: &test.client,
Expand Down
3 changes: 0 additions & 3 deletions lnd_services_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@ func TestLndVersionCheckComparison(t *testing.T) {
}

for _, tc := range testCases {
tc := tc
t.Run(tc.name, func(t *testing.T) {
err := AssertVersionCompatible(
tc.actual, &verrpc.Version{
Expand Down Expand Up @@ -311,8 +310,6 @@ func TestGetLndInfo(t *testing.T) {
}

for _, test := range tests {
test := test

t.Run(test.name, func(t *testing.T) {
mock := newLockLndMock(
test.errors, test.stateErr, test.states,
Expand Down
1 change: 0 additions & 1 deletion macaroon_recipes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func TestMacaroonRecipe(t *testing.T) {

// Run the test for all supported RPC packages.
for pkg, numPermissions := range expectedPermissions {
pkg, numPermissions := pkg, numPermissions
t.Run(pkg, func(t *testing.T) {
t.Parallel()

Expand Down
1 change: 0 additions & 1 deletion router_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -1061,7 +1061,6 @@ func (r *routerClient) ImportMissionControl(ctx context.Context,
}

for i, entry := range entries {
entry := entry
rpcEntry := &routerrpc.PairHistory{
NodeFrom: entry.NodeFrom[:],
NodeTo: entry.NodeTo[:],
Expand Down
2 changes: 1 addition & 1 deletion tools/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM golang:1.22.6-bookworm
FROM golang:1.23.6-bookworm

RUN apt-get update && apt-get install -y git
ENV GOCACHE=/tmp/build/.cache
Expand Down
Loading
Loading