multi: separate profiler config

This commit is contained in:
ziggie
2024-09-25 12:56:18 +02:00
parent 64c20ca308
commit 448193b0fd
5 changed files with 196 additions and 69 deletions

25
lncfg/error.go Normal file
View File

@@ -0,0 +1,25 @@
package lncfg
import "fmt"
// UsageError is an error type that signals a problem with the supplied flags.
type UsageError struct {
Err error
}
// Error returns the error string.
//
// NOTE: This is part of the error interface.
func (u *UsageError) Error() string {
return u.Err.Error()
}
// Unwrap returns the underlying error.
func (u *UsageError) Unwrap() error {
return u.Err
}
// mkErr creates a new error from a string.
func mkErr(format string, args ...interface{}) error {
return fmt.Errorf(format, args...)
}