feat: cache module name of path
parent
7f351b49f6
commit
f6471ab9d6
|
@ -303,6 +303,10 @@ func (ft *Formatter) moduleName(path string) (string, error) {
|
|||
return "", ErrGoModEmptyModule
|
||||
}
|
||||
|
||||
ft.muModuleNames.Lock()
|
||||
ft.moduleNames[path] = result
|
||||
ft.muModuleNames.Unlock()
|
||||
|
||||
return result, nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue