MCPcopy Create free account
hub / github.com/goadesign/goa / Rename

Method Rename

expr/user_type.go:43–48  ·  view source on GitHub ↗

Rename changes the type name to the given value.

(n string)

Source from the content-addressed store, hash-verified

41
42// Rename changes the type name to the given value.
43func (u *UserTypeExpr) Rename(n string) {
44 // Remember original name for example to generate friendly docs.
45 u.AddMeta("name:original", u.TypeName)
46 delete(u.Meta, "struct:type:name")
47 u.TypeName = n
48}
49
50// IsCompatible returns true if u describes the (Go) type of val.
51func (u *UserTypeExpr) IsCompatible(val any) bool {

Callers

nothing calls this directly

Calls 1

AddMetaMethod · 0.65

Tested by

no test coverage detected