mirror of
https://github.com/lightninglabs/lightning-terminal.git
synced 2026-08-13 12:33:36 +02:00
With go 1.16 something changed in how the content of go.sum is calculated. The "go mod tidy" command now removes dependencies for packages that aren't directly referenced through the main package. Therefore if we compile another binary (such as the CLI binaries we ship together with LiT) some of their dependencies might have been pruned from go.sum. To avoid that, we add dummy imports for those packages under a build tag that we don't actually use. The "tools" tag seems to be the idiomatic tag for such tooling depencencies.
13 lines
426 B
Go
13 lines
426 B
Go
// +build tools
|
|
|
|
package terminal
|
|
|
|
import (
|
|
// This is a workaround to make sure go mod keeps around the
|
|
// dependencies in the go.sum file that we only use during compilation
|
|
// of the CLI binaries that are delivered together with LiT.
|
|
_ "github.com/lightninglabs/faraday/cmd/frcli"
|
|
_ "github.com/lightninglabs/loop/cmd/loop"
|
|
_ "github.com/lightninglabs/pool/cmd/pool"
|
|
_ "github.com/lightningnetwork/lnd/cmd/lncli"
|
|
)
|