Skip to content

Commit 306695c

Browse files
authored
Merge pull request #9025 from lightningnetwork/extract-from-staging-branch
[custom channels]: extract some independent commits from mega staging branch
2 parents 278cf03 + 61edb36 commit 306695c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+1382
-795
lines changed

.golangci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,8 @@ issues:
259259
- forbidigo
260260
- godot
261261

262-
# Allow fmt.Printf() in lncli.
263-
- path: cmd/lncli/*
262+
# Allow fmt.Printf() in commands.
263+
- path: cmd/commands/*
264264
linters:
265265
- forbidigo
266266

cmd/lncli/arg_parse.go renamed to cmd/commands/arg_parse.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"regexp"
@@ -42,7 +42,7 @@ func parseTime(s string, base time.Time) (uint64, error) {
4242

4343
var lightningPrefix = "lightning:"
4444

45-
// stripPrefix removes accidentally copied 'lightning:' prefix.
46-
func stripPrefix(s string) string {
45+
// StripPrefix removes accidentally copied 'lightning:' prefix.
46+
func StripPrefix(s string) string {
4747
return strings.TrimSpace(strings.TrimPrefix(s, lightningPrefix))
4848
}

cmd/lncli/arg_parse_test.go renamed to cmd/commands/arg_parse_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"testing"
@@ -111,7 +111,7 @@ func TestStripPrefix(t *testing.T) {
111111
t.Parallel()
112112

113113
for _, test := range stripPrefixTests {
114-
actual := stripPrefix(test.in)
114+
actual := StripPrefix(test.in)
115115
require.Equal(t, test.expected, actual)
116116
}
117117
}

cmd/lncli/autopilotrpc_active.go renamed to cmd/commands/autopilotrpc_active.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//go:build autopilotrpc
22
// +build autopilotrpc
33

4-
package main
4+
package commands
55

66
import (
77
"github.com/lightningnetwork/lnd/lnrpc/autopilotrpc"

cmd/lncli/autopilotrpc_default.go renamed to cmd/commands/autopilotrpc_default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//go:build !autopilotrpc
22
// +build !autopilotrpc
33

4-
package main
4+
package commands
55

66
import "github.com/urfave/cli"
77

cmd/lncli/chainrpc_active.go renamed to cmd/commands/chainrpc_active.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//go:build chainrpc
22
// +build chainrpc
33

4-
package main
4+
package commands
55

66
import (
77
"bytes"

cmd/lncli/chainrpc_default.go renamed to cmd/commands/chainrpc_default.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//go:build !chainrpc
22
// +build !chainrpc
33

4-
package main
4+
package commands
55

66
import "github.com/urfave/cli"
77

cmd/lncli/cmd_custom.go renamed to cmd/commands/cmd_custom.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"encoding/hex"

cmd/lncli/cmd_debug.go renamed to cmd/commands/cmd_debug.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"bytes"

cmd/lncli/cmd_import_mission_control.go renamed to cmd/commands/cmd_import_mission_control.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package main
1+
package commands
22

33
import (
44
"context"

0 commit comments

Comments
 (0)