1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
package main import ( "net/http" "github.com/gorilla/mux" ) func containerGet(d *Daemon, r *http.Request) Response { name := mux.Vars(r)["name"] c, err := containerLoadByName(d, name) if err != nil { return SmartError(err) } state, err := c.Render() if err != nil { return InternalError(err) } return SyncResponse(true, state) } |