Use strings.HasPrefix(name, ".") instead of strings.Index(name, ".") == 0