Last active
January 15, 2017 00:09
-
-
Save amstee/e11cef0414c70eb77c319805cdc868f2 to your computer and use it in GitHub Desktop.
An answer for the exercise stringer
This file contains hidden or 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
| import "fmt" | |
| type IPAddr [4]byte | |
| func (this IPAddr) String() string { | |
| return fmt.Sprintf("%d.%d.%d.%d", this[0], this[1], this[2], this[3]) | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment