mirror of
https://github.com/safing/portmaster
synced 2025-09-02 10:39:22 +00:00
Fix linter warnings
This commit is contained in:
parent
5580cbf4a4
commit
fe6af5f263
4 changed files with 7 additions and 7 deletions
|
@ -74,7 +74,7 @@ func registerComponent(opts []Options) {
|
|||
Use: opt.ShortIdentifier,
|
||||
Short: "Run the " + opt.Name,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
err := run(cmd, opt, args)
|
||||
err := run(opt, args)
|
||||
initiateShutdown(err)
|
||||
return err
|
||||
},
|
||||
|
@ -86,7 +86,7 @@ func registerComponent(opts []Options) {
|
|||
Use: opt.ShortIdentifier,
|
||||
Short: "Show command to execute the " + opt.Name,
|
||||
RunE: func(cmd *cobra.Command, args []string) error {
|
||||
return show(cmd, opt, args)
|
||||
return show(opt, args)
|
||||
},
|
||||
},
|
||||
)
|
||||
|
@ -106,7 +106,7 @@ func getExecArgs(opts *Options, cmdArgs []string) []string {
|
|||
return args
|
||||
}
|
||||
|
||||
func run(cmd *cobra.Command, opts *Options, cmdArgs []string) (err error) {
|
||||
func run(opts *Options, cmdArgs []string) (err error) {
|
||||
// set download option
|
||||
registry.Online = opts.AllowDownload
|
||||
|
||||
|
@ -230,7 +230,7 @@ func copyLogs(opts *Options, consoleSink io.Writer, version, ext string, logSour
|
|||
}
|
||||
|
||||
if bytes, err := io.Copy(sink, logSource); err != nil {
|
||||
log.Printf("%s: writting logs failed after %d bytes: %s", fileSink.Name(), bytes, err)
|
||||
log.Printf("%s: writing logs failed after %d bytes: %s", fileSink.Name(), bytes, err)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ func runService(cmd *cobra.Command, opts *Options, cmdArgs []string) error {
|
|||
go func() {
|
||||
// run slightly delayed
|
||||
time.Sleep(250 * time.Millisecond)
|
||||
err := run(cmd, opts, getExecArgs(opts, cmdArgs))
|
||||
err := run(opts, getExecArgs(opts, cmdArgs))
|
||||
initiateShutdown(err)
|
||||
finishWg.Done()
|
||||
runWg.Done()
|
||||
|
|
|
@ -21,7 +21,7 @@ var showCmd = &cobra.Command{
|
|||
Short: "Show the command to run a Portmaster component yourself",
|
||||
}
|
||||
|
||||
func show(cmd *cobra.Command, opts *Options, cmdArgs []string) error {
|
||||
func show(opts *Options, cmdArgs []string) error {
|
||||
// get original arguments
|
||||
args := getExecArgs(opts, cmdArgs)
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ var versionCmd = &cobra.Command{
|
|||
func init() {
|
||||
flags := versionCmd.Flags()
|
||||
{
|
||||
flags.BoolVar(&showShortVersion, "short", false, "Print only the verison number.")
|
||||
flags.BoolVar(&showShortVersion, "short", false, "Print only the version number.")
|
||||
flags.BoolVar(&showAllVersions, "all", false, "Dump versions for all components.")
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue