MCPcopy Index your code
hub / github.com/dockito/compose2bash / buildScriptDataTemplate

Function buildScriptDataTemplate

main.go:144–161  ·  view source on GitHub ↗
(serviceName string, service Service)

Source from the content-addressed store, hash-verified

142}
143
144func buildScriptDataTemplate(serviceName string, service Service) ScriptDataTemplate {
145 // common data template for all services from the same app
146 data := ScriptDataTemplate{
147 AppName: appName,
148 InteractiveBash: interactiveBash,
149 }
150
151 if dockerHostConn != "" {
152 data.DockerHostConnCmdArg = "--host=" + dockerHostConn
153 }
154
155 // specific data for each service
156 service.Name = appName + "-" + serviceName
157 setLinksWithAppName(&service)
158 data.Service = service
159
160 return data
161}
162
163// Saves the services data into bash scripts
164func saveToBash(services map[string]Service) (err error) {

Callers 1

saveToBashFunction · 0.85

Calls 1

setLinksWithAppNameFunction · 0.85

Tested by

no test coverage detected