Skip to content

Commit 24e477b

Browse files
fl0ydboucher
authored andcommitted
imports to fix compilation issues and drop * from map
Docker-DCO-1.1-Signed-off-by: Mark Oates [email protected] (github: fl0yd)
1 parent d43ad87 commit 24e477b

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

api/server/server.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ func createRouter(s *Server) *mux.Router {
15911591
},
15921592
}
15931593

1594-
addExperimentalRoutes(s, &m)
1594+
addExperimentalRoutes(s, m)
15951595

15961596
// If "api-cors-header" is not given, but "api-enable-cors" is true, we set cors to "*"
15971597
// otherwise, all head values will be passed to HTTP handler

api/server/server_experimental.go

+11-3
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,17 @@
22

33
package server
44

5-
func addExperimentalRoutes(s *Server, m *map[string]map[string]HttpApiFunc) {
6-
m["GET"]["/containers/{name:.*}/checkpoint"] = s.postContainersCheckpoint
7-
m["GET"]["/containers/{name:.*}/restore"] = s.postContainersRestore
5+
import (
6+
"encoding/json"
7+
"fmt"
8+
"net/http"
9+
"github.com/docker/docker/pkg/version"
10+
"github.com/docker/docker/runconfig"
11+
)
12+
13+
func addExperimentalRoutes(s *Server, m map[string]map[string]HttpApiFunc) {
14+
m["POST"]["/containers/{name:.*}/checkpoint"] = s.postContainersCheckpoint
15+
m["POST"]["/containers/{name:.*}/restore"] = s.postContainersRestore
816
}
917

1018
func (s *Server) registerSubRouter() {

api/server/server_stub.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
package server
44

5-
func addExperimentalRoutes(s *Server, m *map[string]map[string]HttpApiFunc) {
5+
func addExperimentalRoutes(s *Server, m map[string]map[string]HttpApiFunc) {
66

77
}
88

0 commit comments

Comments
 (0)