k.go 194 B

1234567891011121314
  1. package kata
  2. import "strings"
  3. func FindShort(s string) int {
  4. sr := strings.Split(s, " ")
  5. min := len(s)
  6. for _, row := range sr {
  7. if len(row) < min {
  8. min = len(row)
  9. }
  10. }
  11. return min
  12. }