Last active
April 27, 2021 19:22
-
-
Save kolotaev/d6af86c41d0de0e3c2bd02dededa3f02 to your computer and use it in GitHub Desktop.
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
package main | |
import ( | |
"fmt" | |
) | |
type String string | |
func (f String) Dasherize() String { | |
return "---" + f + "---" | |
} | |
func Me(me String) String { | |
return me.Dasherize() | |
} | |
func Print(val String) { | |
fmt.Printf("%s", val + "can be concatenated like a string") | |
} | |
func main() { | |
me := Me("Kitty") | |
Print(me) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment