OSDN Git Service

Merge pull request #201 from Bytom/v0.1
[bytom/vapor.git] / vendor / github.com / hashicorp / go-plugin / server_mux.go
diff --git a/vendor/github.com/hashicorp/go-plugin/server_mux.go b/vendor/github.com/hashicorp/go-plugin/server_mux.go
deleted file mode 100644 (file)
index 033079e..0000000
+++ /dev/null
@@ -1,31 +0,0 @@
-package plugin
-
-import (
-       "fmt"
-       "os"
-)
-
-// ServeMuxMap is the type that is used to configure ServeMux
-type ServeMuxMap map[string]*ServeConfig
-
-// ServeMux is like Serve, but serves multiple types of plugins determined
-// by the argument given on the command-line.
-//
-// This command doesn't return until the plugin is done being executed. Any
-// errors are logged or output to stderr.
-func ServeMux(m ServeMuxMap) {
-       if len(os.Args) != 2 {
-               fmt.Fprintf(os.Stderr,
-                       "Invoked improperly. This is an internal command that shouldn't\n"+
-                               "be manually invoked.\n")
-               os.Exit(1)
-       }
-
-       opts, ok := m[os.Args[1]]
-       if !ok {
-               fmt.Fprintf(os.Stderr, "Unknown plugin: %s\n", os.Args[1])
-               os.Exit(1)
-       }
-
-       Serve(opts)
-}