(fd protoreflect.FieldDescriptor)
| 174 | } |
| 175 | |
| 176 | func (w *textWriter) writeName(fd protoreflect.FieldDescriptor) { |
| 177 | if !w.compact && w.complete { |
| 178 | w.writeIndent() |
| 179 | } |
| 180 | w.complete = false |
| 181 | |
| 182 | if fd.Kind() != protoreflect.GroupKind { |
| 183 | w.buf = append(w.buf, fd.Name()...) |
| 184 | w.WriteByte(':') |
| 185 | } else { |
| 186 | // Use message type name for group field name. |
| 187 | w.buf = append(w.buf, fd.Message().Name()...) |
| 188 | } |
| 189 | |
| 190 | if !w.compact { |
| 191 | w.WriteByte(' ') |
| 192 | } |
| 193 | } |
| 194 | |
| 195 | func requiresQuotes(u string) bool { |
| 196 | // When type URL contains any characters except [0-9A-Za-z./\-]*, it must be quoted. |
no test coverage detected