MCPcopy Index your code
hub / github.com/php/frankenphp / generateUniqueModuleWorkerName

Method generateUniqueModuleWorkerName

caddy/app.go:104–120  ·  view source on GitHub ↗
(filepath string)

Source from the content-addressed store, hash-verified

102}
103
104func (f *FrankenPHPApp) generateUniqueModuleWorkerName(filepath string) string {
105 var i uint
106 filepath, _ = fastabs.FastAbs(filepath)
107 name := "m#" + filepath
108
109retry:
110 for _, wc := range f.Workers {
111 if wc.Name == name {
112 name = fmt.Sprintf("m#%s_%d", filepath, i)
113 i++
114
115 goto retry
116 }
117 }
118
119 return name
120}
121
122func (f *FrankenPHPApp) addModuleWorkers(workers ...workerConfig) ([]workerConfig, error) {
123 for i := range workers {

Callers 1

addModuleWorkersMethod · 0.95

Calls 1

FastAbsFunction · 0.92

Tested by

no test coverage detected