exercism/go/two-fer/two_fer.go

14 lines
252 B
Go
Raw Normal View History

2017-08-24 17:10:01 +00:00
package twofer
2017-08-24 17:17:56 +00:00
import "fmt"
// ShareWith just returns "One for <who>, one for me."
// if <who> is empty, use "you"
func ShareWith(who string) string {
ret := "One for %s, one for me."
if who == "" {
who = "you"
}
return fmt.Sprintf(ret, who)
2017-08-24 17:10:01 +00:00
}