Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
atavism committed Dec 10, 2024
1 parent 0437c99 commit a6f385f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion cli/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,9 @@ func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()

// Parse CLI arguments
flags := flashlight.ParseFlags()

signalChan := make(chan os.Signal, 1)
signal.Notify(signalChan, os.Interrupt, syscall.SIGTERM)
go func() {
Expand All @@ -50,17 +52,19 @@ func startLantern(flags flashlight.Flags) {
cdir := configDir(&flags)
pterm.Info.Println("Starting lantern: configDir", cdir)

// Log provided CLI arguments
httpProxyAddr := "127.0.0.1:0"
// Log provided CLI arguments
if flags.ForceProxyAddr != "" {
pterm.Info.Println("Using http proxy address:", flags.ForceProxyAddr)
httpProxyAddr = flags.ForceProxyAddr
}

// Create user configuration for Lantern
settings := loadSettings(cdir)
userConfig := common.NewUserConfig(common.DefaultAppName, settings.GetDeviceID(), settings.GetUserID(),
settings.GetToken(), map[string]string{}, settings.GetLanguage())

// Initialize the Lantern runner
runner, err := flashlight.New(
common.DefaultAppName,
common.ApplicationVersion,
Expand Down

0 comments on commit a6f385f

Please sign in to comment.