// See http://docs.docker.io/en/latest/terms/repository/
//FQIN can include multiple ":" characters. We want everything before the last one.

i := strings.LastIndex(string(r), ":")
if i < 0 {
  return string(r)
}
return string(r)[:i]