You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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 usefmt.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 toos.Stdout
is incorrect.The text was updated successfully, but these errors were encountered: