github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/integration/plugin/logging/cmd/discard/main.go (about) 1 package main 2 3 import ( 4 "net" 5 "net/http" 6 ) 7 8 func main() { 9 l, err := net.Listen("unix", "/run/docker/plugins/plugin.sock") 10 if err != nil { 11 panic(err) 12 } 13 14 mux := http.NewServeMux() 15 handle(mux) 16 17 server := http.Server{ 18 Addr: l.Addr().String(), 19 Handler: mux, 20 } 21 server.Serve(l) 22 }