diff --git a/cmd/url-parser/main.go b/cmd/url-parser/main.go index c03f2e5..add0a72 100644 --- a/cmd/url-parser/main.go +++ b/cmd/url-parser/main.go @@ -99,7 +99,7 @@ func main() { Action: command.Fragment(cfg), }, }, - Before: func(ctx *cli.Context) error { + Before: func(_ *cli.Context) error { if cfg.URL == "" { stat, _ := os.Stdin.Stat() if (stat.Mode() & os.ModeCharDevice) == 0 { diff --git a/command/fragment.go b/command/fragment.go index dcf34ba..e8af47f 100644 --- a/command/fragment.go +++ b/command/fragment.go @@ -9,7 +9,7 @@ import ( // Fragment prints out the fragment part from the url. func Fragment(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if len(parts.Scheme) > 0 { diff --git a/command/host.go b/command/host.go index 03e20f1..682c889 100644 --- a/command/host.go +++ b/command/host.go @@ -9,7 +9,7 @@ import ( // Host prints out the host part from the url. func Host(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if len(parts.Scheme) > 0 { diff --git a/command/password.go b/command/password.go index 5e75b3b..f75055e 100644 --- a/command/password.go +++ b/command/password.go @@ -9,7 +9,7 @@ import ( // Password prints out the password part from url. func Password(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if parts.User != nil { diff --git a/command/path.go b/command/path.go index 499c08d..5a98196 100644 --- a/command/path.go +++ b/command/path.go @@ -23,7 +23,7 @@ func PathFlags(cfg *config.Config) []cli.Flag { // Path prints out the path part from url. func Path(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) i := cfg.PathIndex diff --git a/command/port.go b/command/port.go index 4bd71e6..b4d728c 100644 --- a/command/port.go +++ b/command/port.go @@ -9,7 +9,7 @@ import ( // Port prints out the port from the url. func Port(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if len(parts.Scheme) > 0 { diff --git a/command/query.go b/command/query.go index aa26766..5d2b5bb 100644 --- a/command/query.go +++ b/command/query.go @@ -21,7 +21,7 @@ func QueryFlags(cfg *config.Config) []cli.Flag { // Query prints out the query part from url. func Query(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) f := cfg.QueryField diff --git a/command/run.go b/command/run.go index 440b937..691a083 100644 --- a/command/run.go +++ b/command/run.go @@ -9,7 +9,7 @@ import ( // Run default command and print out full url. func Run(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if len(parts.String()) > 0 { diff --git a/command/scheme.go b/command/scheme.go index f63ad25..3969761 100644 --- a/command/scheme.go +++ b/command/scheme.go @@ -9,7 +9,7 @@ import ( // Scheme prints out the scheme part from the url. func Scheme(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if len(parts.Scheme) > 0 { diff --git a/command/user.go b/command/user.go index 44022e1..5bbbf8b 100644 --- a/command/user.go +++ b/command/user.go @@ -9,7 +9,7 @@ import ( // User prints out the user part from url. func User(cfg *config.Config) cli.ActionFunc { - return func(ctx *cli.Context) error { + return func(_ *cli.Context) error { parts := parseURL(cfg.URL) if parts.User != nil {