MCPcopy Create free account
hub / github.com/cli/cli / stringPlaceholder

Function stringPlaceholder

script/ghmock/restscaffold.go:323–340  ·  view source on GitHub ↗
(format, name string)

Source from the content-addressed store, hash-verified

321}
322
323func stringPlaceholder(format, name string) string {
324 switch format {
325 case "date-time":
326 return placeholderTime
327 case "date":
328 return placeholderDate
329 case "uri", "url":
330 return placeholderURL
331 case "email":
332 return "monalisa@example.com"
333 case "uuid":
334 return "00000000-0000-0000-0000-000000000000"
335 }
336 if name == "" {
337 return "string"
338 }
339 return name
340}
341
342// discriminatorValue is the value that selects alt, such as "private" for
343// GitHub's private-user schema.

Callers 1

generateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected