config: Use any instead of interface{}
This commit is contained in:
parent
143302cfcd
commit
2edf4eb200
@ -1,4 +1,4 @@
|
|||||||
// Copyright (c) 2024 The Decred developers
|
// Copyright (c) 2024-2025 The Decred developers
|
||||||
// Use of this source code is governed by an ISC
|
// Use of this source code is governed by an ISC
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
@ -12,7 +12,7 @@ import (
|
|||||||
// via command line options. Only the help option is evaluated, any invalid
|
// via command line options. Only the help option is evaluated, any invalid
|
||||||
// options are ignored. The return value indicates whether the help message was
|
// options are ignored. The return value indicates whether the help message was
|
||||||
// printed or not.
|
// printed or not.
|
||||||
func WriteHelp(cfg interface{}) bool {
|
func WriteHelp(cfg any) bool {
|
||||||
helpOpts := flags.Options(flags.HelpFlag | flags.PrintErrors | flags.IgnoreUnknown)
|
helpOpts := flags.Options(flags.HelpFlag | flags.PrintErrors | flags.IgnoreUnknown)
|
||||||
_, err := flags.NewParser(cfg, helpOpts).Parse()
|
_, err := flags.NewParser(cfg, helpOpts).Parse()
|
||||||
return flags.WroteHelp(err)
|
return flags.WroteHelp(err)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user