func main() { fmt.Println("at top of testswarm main") var err error //var infoResponse swarmapi.DockerInfoResponse _, err = swarmapi.DockerInfo() os.Exit(0) inspectReq := swarmapi.DockerInspectRequest{} inspectReq.ContainerName = "cpm" var inspectResp swarmapi.DockerInspectResponse inspectResp, err = swarmapi.DockerInspect(&inspectReq) if err != nil { fmt.Println(err.Error()) } fmt.Println(inspectResp.IPAddress) runReq := swarmapi.DockerRunRequest{} runReq.PGDataPath = "/var/cpm/data/pgsql/swarmtest" runReq.ContainerType = "cpm-node" runReq.ContainerName = "swarmtest" runReq.EnvVars = make(map[string]string) runReq.EnvVars["one"] = "value of one" runReq.EnvVars["two"] = "value of two" runReq.CPU = "0" runReq.MEM = "0" var runResp swarmapi.DockerRunResponse runResp, err = swarmapi.DockerRun(&runReq) if err != nil { fmt.Println(err.Error()) } fmt.Println(runResp.ID) }