Skip to content

Commit

Permalink
Fix context plumbing in example command
Browse files Browse the repository at this point in the history
  • Loading branch information
xylo04 committed Mar 1, 2022
1 parent f3f7828 commit eab7767
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion cmd/qrz-lookup/main.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
package main

import (
"context"
"flag"
"fmt"
"github.com/k0swe/qrz-api"
"os"
)

func main() {
ctx := context.Background()
user := flag.String("username", "", "QRZ.com login name")
pw := flag.String("password", "", "QRZ.com password")
call := flag.String("lookup", "", "The callsign to look up")
Expand All @@ -17,7 +19,7 @@ func main() {
os.Exit(1)
}

lookupResp, err := qrz.Lookup(user, pw, call)
lookupResp, err := qrz.Lookup(ctx, user, pw, call)
if err != nil {
_, _ = fmt.Fprintln(os.Stderr, err)
os.Exit(1)
Expand Down

0 comments on commit eab7767

Please sign in to comment.