-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdebug.go
37 lines (33 loc) · 1.62 KB
/
debug.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package main
import (
"fmt"
"github.com/kr/text"
)
func (r *CreateReq) String() string {
txt := "Forj\n"
txt += text.Indent(fmt.Sprintf("debug : %s\n", r.Forj.Debug), " ")
txt += text.Indent(fmt.Sprintf("Infra : %s\n", r.Forj.ForjjInfra), " ")
txt += text.Indent(fmt.Sprintf("Instance : %s\n", r.Forj.ForjjInstanceName), " ")
txt += text.Indent(fmt.Sprintf("Organization : %s\n", r.Forj.ForjjOrganization), " ")
txt += text.Indent(fmt.Sprintf("Source mount : %s\n", r.Forj.ForjjSourceMount), " ")
txt += "\nObjects\n"
txt += text.Indent(r.Objects.String(), " ")
return txt
}
func (o *CreateArgReq) String() string {
txt := "APP:\n"
for app_name, app := range o.App {
txt += fmt.Sprintf("- %s\n", app_name)
txt += text.Indent(fmt.Sprintf("DeployTo : %s\n", app.To), " ")
txt += text.Indent(fmt.Sprintf("DeployServiceAddr : %s\n", app.ServiceAddr), " ")
txt += text.Indent(fmt.Sprintf("DeployServicePort : %s\n", app.ServicePort), " ")
txt += text.Indent(fmt.Sprintf("From Image : %s\n", app.FromImage), " ")
txt += text.Indent(fmt.Sprintf("From Image version : %s\n", app.FromImageVersion), " ")
txt += text.Indent(fmt.Sprintf("Maintainer : %s\n", app.Maintainer), " ")
txt += text.Indent(fmt.Sprintf("Image name : %s\n", app.Name), " ")
txt += text.Indent(fmt.Sprintf("Registry name : %s\n", app.RegistryAuth), " ")
txt += text.Indent(fmt.Sprintf("Registry server : %s\n", app.RegistryServer), " ")
txt += text.Indent(fmt.Sprintf("Generated image version: %s\n", app.Version), " ")
}
return txt
}