Created
June 18, 2020 20:52
-
-
Save alanshaw/48458c638aba34f5a33cd22e55ab9f4c to your computer and use it in GitHub Desktop.
stringer detection
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name := "Unknown" | |
sc, ok := r.Client.(fmt.Stringer) | |
if ok { | |
name = sc.String() | |
} | |
oc.log.Info("optimizing_client", "thanks for the round", "client", name) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment