MCPcopy
hub / github.com/vektra/mockery / AddName

Method AddName

template/method_scope.go:212–214  ·  view source on GitHub ↗

AddName records name as visible in the current scope. This method does not check for naming collisions, and consequently will not modify the given name in any way. It's recommended that you first check MethodScope.NameExists to determine if the name has any collisions, or use MethodScope.AllocateNam

(name string)

Source from the content-addressed store, hash-verified

210// way. It's recommended that you first check MethodScope.NameExists to determine
211// if the name has any collisions, or use MethodScope.AllocateName.
212func (m *MethodScope) AddName(name string) {
213 m.visibleNames[name] = nil
214}
215
216// NameExists returns whether or not the name is currently visible in the scope.
217func (m *MethodScope) NameExists(name string) bool {

Callers 5

NewMethodScopeFunction · 0.95
AllocateNameMethod · 0.95
AddVarMethod · 0.95
addImportMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected