• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

lightningnetwork / lnd / 12284350326

11 Dec 2024 08:27PM UTC coverage: 57.485% (+7.9%) from 49.54%
12284350326

Pull #9348

github

ziggie1984
github: update goveralls tool
Pull Request #9348: github: update goveralls tool

101901 of 177264 relevant lines covered (57.49%)

24841.21 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/cmd/lnd/main.go
1
package main
2

3
import (
4
        "fmt"
5
        "os"
6

7
        "github.com/jessevdk/go-flags"
8
        "github.com/lightningnetwork/lnd"
9
        "github.com/lightningnetwork/lnd/signal"
10
)
11

12
func main() {
×
13
        // Hook interceptor for os signals.
×
14
        shutdownInterceptor, err := signal.Intercept()
×
15
        if err != nil {
×
16
                _, _ = fmt.Fprintln(os.Stderr, err)
×
17
                os.Exit(1)
×
18
        }
×
19

20
        // Load the configuration, and parse any command line options. This
21
        // function will also set up logging properly.
22
        loadedConfig, err := lnd.LoadConfig(shutdownInterceptor)
×
23
        if err != nil {
×
24
                if e, ok := err.(*flags.Error); !ok || e.Type != flags.ErrHelp {
×
25
                        // Print error if not due to help request.
×
26
                        err = fmt.Errorf("failed to load config: %w", err)
×
27
                        _, _ = fmt.Fprintln(os.Stderr, err)
×
28
                        os.Exit(1)
×
29
                }
×
30

31
                // Help was requested, exit normally.
32
                os.Exit(0)
×
33
        }
34
        implCfg := loadedConfig.ImplementationConfig(shutdownInterceptor)
×
35

×
36
        // Call the "real" main in a nested manner so the defers will properly
×
37
        // be executed in the case of a graceful shutdown.
×
38
        if err = lnd.Main(
×
39
                loadedConfig, lnd.ListenerCfg{}, implCfg, shutdownInterceptor,
×
40
        ); err != nil {
×
41
                _, _ = fmt.Fprintln(os.Stderr, err)
×
42
                os.Exit(1)
×
43
        }
×
44
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc