-
Notifications
You must be signed in to change notification settings - Fork 27
Open
Labels
good first issueGood for newcomersGood for newcomers
Description
Currently, the logic in EnvelopeVerifier.Verify uses fmt.Printf to print a warning in one of its code paths: fmt.Printf("Found envelope signed by different subkeys of the same main key, Only one of them is counted towards the step threshold, KeyID=%s\n", keyID)
This is an anti-pattern for a library: the consumer of the library may want to control what is printed to os.Stdout, so libraries should not use fmt.Printf to print directly to it. If this is a legitimate error case it should be returned as an error; otherwise, it should not print output. If logging is desired then it could be done if a logging library is added/used (which is still not great for library functions), but printing directly to os.Stdout is incorrect.
adityasaky and trishankatdatadog
Metadata
Metadata
Assignees
Labels
good first issueGood for newcomersGood for newcomers